Monitor vulnerabilities like this one. Sign up free to get alerted when software you use is affected.
5.7

CPython legacy .pyc file loading bypasses security checks

CVE-2026-2297 PSF-2026-9
Summary

An issue exists in how CPython handles legacy .pyc files. This means some security checks are not applied when loading these files. To protect your system, ensure you're running the latest version of CPython, and configure your system to use secure file loading methods.

What to do
  • Update libpython to version 3.15.0.
  • Update python to version 3.15.0.
  • Update python-min to version 3.15.0.
Affected software
VendorProductAffected versionsFix available
libpython <= 3.15.0 3.15.0
python <= 3.15.0 3.15.0
python-min <= 3.15.0 3.15.0
Original title
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....
Original 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.
nvd CVSS4.0 5.7
Vulnerability type
CWE-668
Published: 4 Mar 2026 · Updated: 14 Mar 2026 · First seen: 6 Mar 2026