CVE-2026-4224: Stack overflow parsing XML with deeply nested DTD content models
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.
Security readout for executives and security teams
Plain-English summary
A specially structured XML document can crash a vulnerable CPython process when its Expat parser uses an ElementDeclHandler. The result is service disruption, not disclosed data theft or modification. Exploitation requires deeply nested content within an inline DTD and the affected handler configuration.
Executive priority
Treat as a targeted availability issue rather than an enterprise-wide emergency. Patch internet-facing or multi-tenant XML-processing services promptly when the vulnerable handler path is present. Lower priority is reasonable where the handler is absent or untrusted inline DTDs cannot reach the parser, after validation.
Technical view
Deep recursion while Expat parses a nested DTD content model can exhaust the C call stack, causing a stack overflow. The CVSS 4.0 assessment is 6.0 and availability-only, with low attack complexity, low privileges, no user interaction, and an additional prerequisite condition. The weakness is CWE-674: uncontrolled recursion.
Likely exposure
Exposure is most likely where listed CPython versions parse attacker-influenced XML containing inline DTDs and register ElementDeclHandler. Applications that reject untrusted XML or do not configure that handler are less likely to reach the vulnerable path. The bundle lists versions ambiguously, so confirm applicability through the Python advisory.
Exploitation context
The CVE is not listed as KEV, and the supplied sources provide no evidence of active exploitation. A network attack is reflected in the CVSS vector, but it requires low privileges and a prerequisite condition. Expected impact is process termination or denial of service.
Researcher notes
The critical reachability condition is a registered ElementDeclHandler parsing an inline DTD with a deeply nested content model. The supplied record indicates no confidentiality or integrity impact. Multiple CPython patch commits are referenced, but the bundle does not clearly state exact fixed release numbers or a complete affected-version range.
Mitigation direction
Review the Python security advisory and apply the vendor-fixed release appropriate to each maintained CPython branch.
Prioritize services parsing attacker-controlled XML with inline DTD support and ElementDeclHandler enabled.
Until patched, restrict untrusted XML ingestion or reject inline DTD content where operationally feasible.
Restart or redeploy updated services and confirm runtime versions changed.
Validation and detection
Inventory CPython versions across services that process XML.
Identify applications registering ElementDeclHandler and document whether XML input crosses an untrusted boundary.
Confirm deployed builds include the applicable CPython patch or vendor-fixed release.
Run vendor regression tests in a non-production environment without using public exploit payloads.
Monitor XML-processing services for abnormal crashes, restarts, or availability degradation.
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-674: 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-674 · source CWE mapping
Uncontrolled Recursion
Uncontrolled Recursion represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.