CVE-2026-2297: 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.
Security readout for executives and security teams
Plain-English summary
CPython can load certain legacy bytecode-only files without triggering the expected security audit event. Organizations relying on that event to inspect or block code loading may have a control gap. The issue requires local, low-privileged access and a prerequisite condition, limiting broad remote risk.
Executive priority
Treat this as a targeted integrity-control issue, not an emergency remote-compromise event. Prioritize systems that use Python audit hooks as enforcement boundaries or permit local users to influence import locations. Schedule vendor-approved updates through normal vulnerability remediation timelines, escalating exposed security-sensitive runtimes.
Technical view
SourcelessFileLoader reads legacy .pyc files through FileLoader without using io.open_code(). Consequently, sys.audit handlers associated with that operation do not fire. This can bypass audit-based enforcement or monitoring for affected imports; the CVSS 4.0 assessment indicates high integrity impact but no confidentiality or availability impact.
Likely exposure
Exposure is most likely where a listed CPython version loads legacy sourceless .pyc files and security controls depend on io.open_code audit events. The bundle identifies specific versions, not complete affected ranges, so vendor or distributor backport status must be checked.
Exploitation context
The bundle marks this CVE as absent from KEV and provides no cited evidence of active exploitation. The CVSS vector requires local access, low privileges, and a prerequisite condition. Practical impact depends on an attacker influencing imported .pyc content and the environment relying on the missing audit event.
Researcher notes
The supplied affected data names 0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, and 3.15.0a1 while declaring other versions unaffected by default. It supplies no version ranges or fixed release numbers. Multiple upstream commits are identified as patches; downstream package status remains unspecified.
Mitigation direction
Review the CPython patch commits and obtain an updated or backported package from the relevant vendor or distributor.
Restrict low-privileged users from modifying application bytecode files and directories searched during imports.
Avoid untrusted legacy sourceless .pyc files where operationally feasible.
Do not treat audit-event monitoring as the only control protecting executable Python import paths.
Validation and detection
Inventory CPython deployments matching the specifically listed versions.
Identify applications using sys.audit or io.open_code events for monitoring or enforcement.
Confirm whether workloads load legacy sourceless .pyc files from writable or untrusted locations.
In safe staging, verify the expected audit event occurs after applying the vendor-approved fix.
Confirm package backport status against the referenced CPython changes.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-668: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-668 · source CWE mapping
Exposure of Resource to Wrong Sphere
Exposure of Resource to Wrong Sphere represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.