Skip to main content
EPSS 0.7%top 49%

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

0
High
Published: 05/20/2026 (05/20/2026, 12:04:32 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: CPython

Description

When an Expat parser with a registered ElementDeclHandler parses an inline document type definition containing a deeply nested content model a C stack overflow occurs.

CVSS v4.0

Score 6.0medium

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/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.0a8
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.0a8

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:44 UTC

Technical Analysis

The vulnerability CVE-2026-4224 affects CPython's XML parsing functionality when using the Expat parser with an ElementDeclHandler registered. Parsing an inline DTD with a deeply nested content model triggers a C stack overflow, which can crash the interpreter or cause denial of service. The issue is classified under CWE-674 (Improper Control of a Resource Through a Reference to a Resource in Another Sphere). The CVSS 4.0 base score is 6.0 (medium severity), with network attack vector, low attack complexity, partial privileges required, no user interaction, and high impact on availability. The vulnerability is published and assigned by the Python Software Foundation but no patch or remediation details are provided in the source data.

Potential Impact

Successful exploitation of this vulnerability results in a C stack overflow during XML parsing, which can cause the Python interpreter to crash or become unavailable. This impacts availability but does not indicate confidentiality or integrity loss. The vulnerability requires partial privileges and no user interaction, with network attack vector, making remote exploitation feasible under certain conditions.

Mitigation Recommendations

Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until an official fix is available, avoid parsing untrusted XML data with Expat parsers that register ElementDeclHandler callbacks or implement application-level input validation to prevent deeply nested DTD content models.

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-03-15T18:10:54.886Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69b84a02771bdb174918693d

Added to database: 03/16/2026, 18:20:50 UTC

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

Last updated: 09/13/2026, 22:01:34 UTC

Views: 345

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