SourcelessFileLoader does not use io.open_code()
Summary
| CVE | CVE-2026-2297 |
|---|---|
| State | PUBLISHED |
| Assigner | PSF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-03-04 23:16:10 UTC |
| Updated | 2026-05-01 16:16:30 UTC |
| Description | The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (a base class) and so does not use io.open_code() to read the .pyc files. sys.audit handlers for this audit event therefore do not fire. |
Risk And Classification
Primary CVSS: v4.0 5.7 MEDIUM from [email protected]
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS: 0.000180000 probability, percentile 0.047230000 (date 2026-05-05)
Problem Types: CWE-668 | CWE-668 CWE-668 Exposure of Resource to Wrong Sphere
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | [email protected] | Secondary | 5.7 | MEDIUM | CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/C... |
| 4.0 | CNA | CVSS | 5.7 | MEDIUM | CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N |
CVSS v4.0 Breakdown
Attack Vector
LocalAttack Complexity
LowAttack Requirements
PresentPrivileges Required
LowUser Interaction
NoneConfidentiality
NoneIntegrity
HighAvailability
NoneSub Conf.
NoneSub Integrity
NoneSub Availability
NoneCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Python Software Foundation | CPython | affected 3.13.13 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.14.0 3.14.4 python | Not specified |
| CNA | Python Software Foundation | CPython | affected 3.15.0a1 3.15.0a7 python | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/python/cpython/commit/482d6f8bdba9da3725d272e8bb4a2d25fb6a603e | [email protected] | github.com | |
| github.com/python/cpython/commit/e58e9802b9bec5cdbf48fc9bf1da5f4fda482e86 | [email protected] | github.com | |
| github.com/python/cpython/issues/145506 | [email protected] | github.com | |
| github.com/python/cpython/commit/69ddd9bb2cc4bd69b1565647c18659c6a789ccd9 | [email protected] | github.com | |
| www.openwall.com/lists/oss-security/2026/03/05/6 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | |
| github.com/python/cpython/pull/145507 | [email protected] | github.com | |
| github.com/python/cpython/commit/876858c9f65d9ab656c7fa639f268ce7856d89dd | [email protected] | github.com | |
| github.com/python/cpython/commit/a51b1b512de1d56b3714b65628a2eae2b07e535e | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.