CVE-2026-2297

NameCVE-2026-2297
DescriptionThe 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.
SourceCVE (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 PackageReleaseVersionStatus
pypy3 (PTS)bullseye7.3.5+dfsg-2+deb11u2vulnerable
bullseye (security)7.3.5+dfsg-2+deb11u5vulnerable
bookworm7.3.11+dfsg-2+deb12u3vulnerable
trixie7.3.19+dfsg-2vulnerable
forky, sid7.3.21+dfsg-4vulnerable
python2.7 (PTS)bullseye2.7.18-8+deb11u1fixed
python3.11 (PTS)bookworm3.11.2-6+deb12u6vulnerable
bookworm (security)3.11.2-6+deb12u3vulnerable
python3.13 (PTS)trixie3.13.5-2vulnerable
forky, sid3.13.12-1vulnerable
python3.14 (PTS)forky, sid3.14.3-3vulnerable
python3.9 (PTS)bullseye3.9.2-1vulnerable
bullseye (security)3.9.2-1+deb11u5vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pypy3source(unstable)(unfixed)
python2.7source(unstable)(not affected)
python3.11source(unstable)(unfixed)
python3.13source(unstable)(unfixed)
python3.14source(unstable)(unfixed)
python3.9source(unstable)(unfixed)

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)

Search for package or bug name: Reporting problems