Skip to main content
EPSS 0.2%top 88%

CVE-2026-2297: Vulnerability in Python Software Foundation CPython

0
Medium
Published: 03/04/2026 (03/04/2026, 23:16:00 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: 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.

CVSS v4.0

Score 5.7medium

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Affected software

Python Software Foundation

CPython

Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.13>=3.14.0 <3.14.4>=3.15.0a1 <3.15.0a7
GitHub Actionsmore threats →ai
python/cpython
pkg:github/python/cpython
Affected versions
=0=3.14.0=3.15.0
GitHub Actionsmore threats →cve
CPython
pkg:github/CPython
Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.13>=3.14.0 <3.14.4>=3.15.0a1 <3.15.0a7

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/13/2026, 13:09:14 UTC

Technical Analysis

The vulnerability in CPython arises because the import hook that manages legacy .pyc files (SourcelessFileLoader) is incorrectly implemented in its base class FileLoader. Specifically, FileLoader does not utilize io.open_code() when reading .pyc files, which results in sys.audit events for this operation not being triggered. This flaw affects the auditing mechanism rather than the core loading functionality itself.

Potential Impact

The impact is limited to the failure of sys.audit handlers to fire during the reading of legacy .pyc files. This could reduce the effectiveness of auditing and monitoring systems relying on these events to detect or log import activities. There is no indication of direct code execution or privilege escalation from this vulnerability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided at this time. Users should monitor Python Software Foundation advisories for updates and consider additional auditing or monitoring controls to compensate for this gap until a fix is available.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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: 03/04/2026, 22:18:20 UTC

Last enriched: 08/13/2026, 13:09:14 UTC

Last updated: 09/14/2026, 22:01:33 UTC

Views: 679

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses