What’s Vulnerable › Vulnerabilities
CVE-2026-4224: Stack overflow parsing XML with deeply nested DTD content models
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-03-16 · updated 2026-08-13
- Weakness: CWE-674
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.
Affected products
- Python: before 3.10.0; from 3.13.0 before 3.13.13; from 3.14.0 before 3.14.4; 3.15.0-alpha1, 3.15.0-alpha2, 3.15.0-alpha3, 3.15.0-alpha4, 3.15.0-alpha5, 3.15.0-alpha6 (+1) — fixed in 3.10.0, 3.13.13, 3.14.4
How to fix
Upgrade to a fixed version: Python 3.10.0, 3.13.13, 3.14.4. Check the vendor advisory for mitigations.
References
- https://github.com/python/cpython/commit/196edfb06a7458377d4d0f4b3cd41724c1f3bd4a
- https://github.com/python/cpython/commit/24ce88b285f56ee11626cf5e472af3cd8cc7c621
- https://github.com/python/cpython/commit/642865ddf4b232da1f3b1f7abcfa3254c4bfe785
- https://github.com/python/cpython/commit/af856a7177326ac25d9f66cc6dd28b554d914fee
- https://github.com/python/cpython/commit/e0a8a6da90597a924b300debe045cdb4628ee1f3
- https://github.com/python/cpython/commit/eb0e8be3a7e11b87d198a2c3af1ed0eccf532768
- https://github.com/python/cpython/issues/145986
- https://github.com/python/cpython/pull/145987
- https://mail.python.org/archives/list/security-announce@python.org/thread/5M7CGUW3XBRY7II4DK43KF7NQQ3TPZ6R/
- http://www.openwall.com/lists/oss-security/2026/03/16/4
Get alerted when CVE-2026-4224 or the next vulnerability affects your stack