CVE-2026-2297: Vulnerability in Python Software Foundation CPython
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.
AI Analysis
Technical Summary
The vulnerability in CPython concerns the handling of legacy .pyc files by the import hook mechanism. Specifically, the FileLoader base class incorrectly processes these files by not utilizing io.open_code() for reading, which prevents sys.audit handlers from firing during this import event. This issue impacts CPython versions including 0, 3.14.0, and 3.15.0a1. The CVSS 4.0 score is 5.7 (medium severity), indicating a local attack vector with low complexity, requiring partial privileges, no user interaction, and resulting in high impact on integrity but no impact on confidentiality or availability.
Potential Impact
The vulnerability causes sys.audit handlers not to trigger when legacy .pyc files are imported, potentially reducing the effectiveness of auditing and monitoring mechanisms that rely on these handlers. There is no direct impact on confidentiality or availability, but integrity could be affected if malicious .pyc files are loaded without proper audit logging. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no patch links or official fixes are provided, users should monitor Python Software Foundation advisories for updates. Until a fix is available, consider additional monitoring or controls around the use of legacy .pyc files and audit configurations.
CVE-2026-2297: Vulnerability in Python Software Foundation CPython
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in CPython concerns the handling of legacy .pyc files by the import hook mechanism. Specifically, the FileLoader base class incorrectly processes these files by not utilizing io.open_code() for reading, which prevents sys.audit handlers from firing during this import event. This issue impacts CPython versions including 0, 3.14.0, and 3.15.0a1. The CVSS 4.0 score is 5.7 (medium severity), indicating a local attack vector with low complexity, requiring partial privileges, no user interaction, and resulting in high impact on integrity but no impact on confidentiality or availability.
Potential Impact
The vulnerability causes sys.audit handlers not to trigger when legacy .pyc files are imported, potentially reducing the effectiveness of auditing and monitoring mechanisms that rely on these handlers. There is no direct impact on confidentiality or availability, but integrity could be affected if malicious .pyc files are loaded without proper audit logging. No known exploits are reported in the wild.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Since no patch links or official fixes are provided, users should monitor Python Software Foundation advisories for updates. Until a fix is available, consider additional monitoring or controls around the use of legacy .pyc files and audit configurations.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-02-10T16:26:08.298Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69a8afacd1a09e29cb7ac729
Added to database: 3/4/2026, 10:18:20 PM
Last enriched: 4/7/2026, 10:40:58 PM
Last updated: 4/18/2026, 9:52:49 AM
Views: 366
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.