CVE-2026-2297
NVDCVSS scored by cna@python.org
Vulnerability Summary
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.
CVSS v4.0 Base Metrics — Score 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/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:XAttack VectorLocal
Attack ComplexityLow
Attack RequirementsPresent
Privileges RequiredLow
User InteractionNone
Confidentiality (Vulnerable System)None
Integrity (Vulnerable System)High
Availability (Vulnerable System)None
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Affected & Patched Versions
Not provided by NVD for this CVE.
No patched version published yet
Until a fix ships, reduce exposure:
- Restrict access to the affected service or interface to trusted networks.
- Disable the affected feature if you do not need it.
- Watch the vendor advisory for a firmware or software update.
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run the affected product and which version.
- No patched version is listed yet. Limit access to the affected service to trusted networks, and disable the feature if you can.
- Subscribe to the vendor advisory so you learn when a fix ships.
Timeline
- Mar 4, 2026Published
- Mar 4, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get alerts for CVEs like this oneYou are reading CVE-2026-2297. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
- Patchhttps://github.com/python/cpython/commit/482d6f8bdba9da3725d272e8bb4a2d25fb6a603e
- Patchhttps://github.com/python/cpython/commit/a51b1b512de1d56b3714b65628a2eae2b07e535e
- Patchhttps://github.com/python/cpython/commit/e58e9802b9bec5cdbf48fc9bf1da5f4fda482e86
- Issue Trackinghttps://github.com/python/cpython/issues/145506
- Patchhttps://github.com/python/cpython/pull/145507
Data last checked: Dec 5, 2026 11:13 UTC