Audit Event Bypass in CPython FileLoader before 3.15.0
CVE-2026-2297 Published on March 4, 2026

SourcelessFileLoader does not use io.open_code()
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

Weakness Type

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.


Products Associated with CVE-2026-2297

Want to know whenever a new CVE is published for Cpython? stack.watch will email you.

 

Affected Versions

Python Software Foundation CPython:

Exploit Probability

EPSS
0.02%
Percentile
3.37%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.