CVE-2026-4224: Stack overflow parsing XML with deeply nested DTD content models
Last updated 10 September 2026
Other sources
Stack overflow parsing XML with deeply nested DTD content models
— Microsoft
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.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.9.19-21 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.12.14-1 - Upgrade
Upgrade
debian/python3.11to a version that resolves this vulnerability.Fixed in 3.11.2-6+deb12u8 - Upgrade
Upgrade
debian/python3.13to a version that resolves this vulnerability.Fixed in 3.13.5-2+deb13u2 - Upgrade
Upgrade
debian/python3.14to a version that resolves this vulnerability.Fixed in 3.14.3-4 - Upgrade
Upgrade
debian/python3.13to a version that resolves this vulnerability.Fixed in 3.13.5-2+deb13u2Fixed in 3.13.14-1 - Upgrade
Upgrade
debian/python3.9to a version that resolves this vulnerability.Fixed in 3.9.2-1+deb11u7 - Upgrade
Upgrade
ubuntu/python2.7to a version that resolves this vulnerability.Fixed in 2.7.6-8ubuntu0.6+esm30 - Upgrade
Upgrade
ubuntu/python3.4to a version that resolves this vulnerability.Fixed in 3.4.3-1ubuntu1~14.04.7+esm21 - Upgrade
Upgrade
ubuntu/python3.5to a version that resolves this vulnerability.Fixed in 3.5.2-2ubuntu0~16.04.4~14.04.1+esm11 - Upgrade
Upgrade
ubuntu/python2.7to a version that resolves this vulnerability.Fixed in 2.7.12-1ubuntu0~16.04.18+esm22 - Upgrade
Upgrade
ubuntu/python3.5to a version that resolves this vulnerability.Fixed in 3.5.2-2ubuntu0~16.04.13+esm25 - Upgrade
Upgrade
ubuntu/python2.7to a version that resolves this vulnerability.Fixed in 2.7.17-1~18.04ubuntu1.13+esm15 - Upgrade
Upgrade
ubuntu/python3.6to a version that resolves this vulnerability.Fixed in 3.6.9-1~18.04ubuntu1.13+esm10 - Upgrade
Upgrade
ubuntu/python3.7to a version that resolves this vulnerability.Fixed in 3.7.5-2ubuntu1~18.04.2+esm11 - Upgrade
Upgrade
ubuntu/python3.8to a version that resolves this vulnerability.Fixed in 3.8.0-3ubuntu1~18.04.2+esm11 - Upgrade
Upgrade
ubuntu/python3.8to a version that resolves this vulnerability.Fixed in 3.8.10-0ubuntu1~20.04.18+esm7 - Upgrade
Upgrade
ubuntu/python3.9to a version that resolves this vulnerability.Fixed in 3.9.5-3ubuntu0~20.04.1+esm11 - Upgrade
Upgrade
ubuntu/python3.10to a version that resolves this vulnerability.Fixed in 3.10.12-1~22.04.16 - Upgrade
Upgrade
ubuntu/python2.7to a version that resolves this vulnerability.Fixed in 2.7.18-13ubuntu1.5+esm9 - Upgrade
Upgrade
ubuntu/python3.11to a version that resolves this vulnerability.Fixed in 3.11.0~rc1-1~22.04.1+esm2 - Upgrade
Upgrade
ubuntu/python3.12to a version that resolves this vulnerability.Fixed in 3.12.3-1ubuntu0.15
Event History
Frequently Asked Questions
What is the severity of CVE-2026-4224?
CVE-2026-4224 has a high severity due to its potential to cause a stack overflow in applications using the Expat parser.
How do I fix CVE-2026-4224?
To fix CVE-2026-4224, you should upgrade to the latest version of Python CPython that includes the patch addressing this vulnerability.
What causes CVE-2026-4224?
CVE-2026-4224 is caused by a stack overflow that occurs when an Expat parser processes an inline document type definition with deeply nested content models.
Which versions of Python CPython are affected by CVE-2026-4224?
CVE-2026-4224 affects versions of Python CPython that utilize the Expat parser without the necessary safeguards against deep nesting in DTD content models.
Is CVE-2026-4224 exploitable remotely?
Yes, CVE-2026-4224 is remotely exploitable if an attacker can craft a malicious XML document that triggers the stack overflow.