| Name | CVE-2026-2297 |
| 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. |
| Source | CVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|
| pypy3 (PTS) | bullseye | 7.3.5+dfsg-2+deb11u2 | vulnerable |
| bullseye (security) | 7.3.5+dfsg-2+deb11u5 | vulnerable |
| bookworm | 7.3.11+dfsg-2+deb12u3 | vulnerable |
| trixie | 7.3.19+dfsg-2 | vulnerable |
| forky, sid | 7.3.21+dfsg-4 | vulnerable |
| python2.7 (PTS) | bullseye | 2.7.18-8+deb11u1 | fixed |
| python3.11 (PTS) | bookworm | 3.11.2-6+deb12u6 | vulnerable |
| bookworm (security) | 3.11.2-6+deb12u3 | vulnerable |
| python3.13 (PTS) | trixie | 3.13.5-2 | vulnerable |
| forky, sid | 3.13.12-1 | vulnerable |
| python3.14 (PTS) | forky, sid | 3.14.3-3 | vulnerable |
| python3.9 (PTS) | bullseye | 3.9.2-1 | vulnerable |
| bullseye (security) | 3.9.2-1+deb11u5 | vulnerable |
The information below is based on the following data on fixed versions.
Notes
- python2.7 <not-affected> (PEP 578 not introduced yet)
https://github.com/python/cpython/issues/145506
https://github.com/python/cpython/pull/145507
https://github.com/python/cpython/commit/a51b1b512de1d56b3714b65628a2eae2b07e535e (main)
https://github.com/python/cpython/commit/e58e9802b9bec5cdbf48fc9bf1da5f4fda482e86 (3.14)
https://github.com/python/cpython/commit/482d6f8bdba9da3725d272e8bb4a2d25fb6a603e (3.13)
https://github.com/python/cpython/pull/145515 (pull request for 3.11)
Relates to Runtime Audit Hooks https://peps.python.org/pep-0578/ (v3.8)