CVE-2026-2297
Vulnerability Summary
Timeline
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.
CVSS Metrics
- v4.0•MEDIUM•Score: 5.7CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
- v4.0•MEDIUM•Score: 5.7CVSS: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 Trends
Current EPSS score: 0.21%• Percentile: 12%
Techniques & Countermeasures
- CWE-668•Exposure of Resource to Wrong Sphere
The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.
Affected Systems
- alpine•python3
< 3.12.14-r0 | < 3.12.14-r0 | < 3.12.14-r0 | < 3.14.5-r0
- chainguard•python-3.10
< 3.10.21-r0
- chainguard•python-3.11
< 3.11.16-r1
- chainguard•python-3.12
< 3.12.14-r2
- chainguard•python-3.13
< 3.13.12-r3
- chainguard•python-3.14
< 3.14.3-r3
- chainguard•python-3.14-base-dev
< 3.14.3-r3
- chainguard•python-3.14-dev
< 3.14.3-r3
- chainguard•python-3.14-doc
< 3.14.3-r3
- chainguard•python-3.14-jit
< 3.14.3-r3
- chainguard•python-3.14-privileged-netbindservice
< 3.14.3-r3
- chainguard•python-3.14-tk
< 3.14.3-r3
- chainguard•python-3.14t
< 3.14.3-r3
- chainguard•python-3.9
all
- wolfi•python-3.10
< 3.10.21-r0
- wolfi•python-3.11
< 3.11.16-r1
- wolfi•python-3.12
< 3.12.14-r2
- wolfi•python-3.13
< 3.13.12-r3
- wolfi•python-3.14
< 3.14.3-r3
- wolfi•python-3.14-base-dev
< 3.14.3-r3
- wolfi•python-3.14-dev
< 3.14.3-r3
- wolfi•python-3.14-doc
< 3.14.3-r3
- wolfi•python-3.14-jit
< 3.14.3-r3
- wolfi•python-3.14-privileged-netbindservice
< 3.14.3-r3
- wolfi•python-3.14-tk
< 3.14.3-r3
- wolfi•python-3.14t
< 3.14.3-r3
- debian•pypy3
all | all | all | < 7.3.22+dfsg-1
- debian•python3.11
< 3.11.2-6+deb12u8
- debian•python3.13
< 3.13.5-2+deb13u1 | < 3.13.14-1
- debian•python3.14
< 3.14.3-4
- debian•python3.9
< 3.9.2-1+deb11u7
- ubuntu•python3.10
< 3.10.12-1~22.04.16
- ubuntu•python3.11
all | all
- ubuntu•python3.12
< 3.12.3-1ubuntu0.15
- ubuntu•python3.13
all
- ubuntu•python3.14
all
- ubuntu•python3.8
all
- ubuntu•python3.9
all
- python software foundation•cpython
< 3.15.0a7 | < 3.14.4 | < 3.13.13 | < 3.10.21 | ≥ 3.11.0, < 3.11.16 | ≥ 3.12.0, < 3.12.14 | ≥ 3.13.0, < 3.13.13 | ≥ 3.14.0, < 3.14.4 | ≥ 3.15.0a1, < 3.15.0a7
References (17)
- https://github.com/python/cpython/issues/145506
- https://github.com/python/cpython/pull/145507
- https://github.com/python/cpython/commit/482d6f8bdba9da3725d272e8bb4a2d25fb6a603e
- https://github.com/python/cpython/commit/a51b1b512de1d56b3714b65628a2eae2b07e535e
- https://github.com/python/cpython/commit/e58e9802b9bec5cdbf48fc9bf1da5f4fda482e86
- http://www.openwall.com/lists/oss-security/2026/03/05/6
- https://github.com/python/cpython/commit/69ddd9bb2cc4bd69b1565647c18659c6a789ccd9
- https://github.com/python/cpython/commit/876858c9f65d9ab656c7fa639f268ce7856d89dd
- https://github.com/python/cpython/commit/c70adad78caeeea33f92f560ecb93331ca11bf66
- https://security-tracker.debian.org/tracker/CVE-2026-2297
- https://security.alpinelinux.org/vuln/CVE-2026-2297
- https://ubuntu.com/security/CVE-2026-2297
- https://www.cve.org/CVERecord?id=CVE-2026-2297
- https://ubuntu.com/security/notices/USN-8509-1
- https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/2xxx/CVE-2026-2297.json
- https://nvd.nist.gov/vuln/detail/CVE-2026-2297
- https://github.com/python/cpython