---
id: CVE-2026-4224
title: |-
  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.
summary: |-
  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.
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-674
  - CWE-805
vendor: python
product: python
affected:
  - python < 3.10.0
  - 'python >= 3.13.0, < 3.13.13'
  - 'python >= 3.14.0, < 3.14.4'
  - python = 3.15.0
patched:
  - python 3.14.4
published: '2026-03-16'
updated: '2026-08-05'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-4224'
references:
  - url: >-
      https://github.com/python/cpython/commit/196edfb06a7458377d4d0f4b3cd41724c1f3bd4a
    label: cna@python.org
  - url: >-
      https://github.com/python/cpython/commit/24ce88b285f56ee11626cf5e472af3cd8cc7c621
    label: cna@python.org
  - url: >-
      https://github.com/python/cpython/commit/642865ddf4b232da1f3b1f7abcfa3254c4bfe785
    label: cna@python.org
  - url: >-
      https://github.com/python/cpython/commit/af856a7177326ac25d9f66cc6dd28b554d914fee
    label: cna@python.org
  - url: >-
      https://github.com/python/cpython/commit/e0a8a6da90597a924b300debe045cdb4628ee1f3
    label: cna@python.org
  - url: >-
      https://github.com/python/cpython/commit/eb0e8be3a7e11b87d198a2c3af1ed0eccf532768
    label: cna@python.org
  - url: 'https://github.com/python/cpython/issues/145986'
    label: cna@python.org
  - url: 'https://github.com/python/cpython/pull/145987'
    label: cna@python.org
  - url: >-
      https://mail.python.org/archives/list/security-announce@python.org/thread/5M7CGUW3XBRY7II4DK43KF7NQQ3TPZ6R/
    label: cna@python.org
  - url: 'http://www.openwall.com/lists/oss-security/2026/03/16/4'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-4224.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-4224'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2448181'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-4224'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-4224'
  - url: 'https://access.redhat.com/errata/RHSA-2026:19064'
  - url: 'https://access.redhat.com/errata/RHSA-2026:19019'
  - url: 'https://access.redhat.com/errata/RHSA-2026:10950'
  - url: 'https://access.redhat.com/errata/RHSA-2026:19177'
  - url: 'https://access.redhat.com/errata/RHSA-2026:19176'
  - url: 'https://access.redhat.com/errata/RHSA-2026:8822'
  - url: 'https://access.redhat.com/errata/RHSA-2026:8824'
  - url: 'https://access.redhat.com/errata/RHSA-2026:7443'
  - url: 'https://access.redhat.com/errata/RHSA-2026:7661'
  - url: 'https://access.redhat.com/errata/RHSA-2026:21275'
  - url: 'https://access.redhat.com/errata/RHSA-2026:58981'
tags:
  - nvd
  - csaf
  - vex
  - red-hat
epss: 0.01212
epssPercentile: 0.67164
ingestedAt: '2026-08-05T11:47:24.045Z'
scores:
  nvd: 7.5
  vendor: 5.9
---

## Overview

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

- `python < 3.10.0`
- `python >= 3.13.0, < 3.13.13`
- `python >= 3.14.0, < 3.14.4`
- `python = 3.15.0`

## Remediation

Upgrade past the affected range:

- `python 3.14.4`

## Vendor advisories

- **RHSA-2026:19064** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux BaseOS (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) · released 2026-05-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:19064)
- **RHSA-2026:19019** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 10), Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) · released 2026-05-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:19019)
- **RHSA-2026:10950** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 8), Red Hat Enterprise Linux CRB (v. 8) · released 2026-04-27 · [advisory](https://access.redhat.com/errata/RHSA-2026:10950)
- **RHSA-2026:19177** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) · released 2026-05-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:19177)
- **RHSA-2026:19176** · Red Hat · fixed in: Red Hat Enterprise Linux AppStream (v. 9), Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) · released 2026-05-19 · [advisory](https://access.redhat.com/errata/RHSA-2026:19176)
- **RHSA-2026:8822** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-17 · [advisory](https://access.redhat.com/errata/RHSA-2026:8822)
- **RHSA-2026:8824** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-17 · [advisory](https://access.redhat.com/errata/RHSA-2026:8824)
- **RHSA-2026:7443** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-10 · [advisory](https://access.redhat.com/errata/RHSA-2026:7443)
- **RHSA-2026:7661** · Red Hat · fixed in: Red Hat Hardened Images · released 2026-04-11 · [advisory](https://access.redhat.com/errata/RHSA-2026:7661)
- **RHSA-2026:21275** · Red Hat · fixed in: Red Hat Update Infrastructure 5 · released 2026-05-27 · [advisory](https://access.redhat.com/errata/RHSA-2026:21275)
- **RHSA-2026:58981** · Red Hat · fixed in: Red Hat Update Infrastructure 5 · released 2026-08-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:58981)
- **Red Hat VEX** · Moderate · affected: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, Red Hat Enterprise Linux AI (RHEL AI) 3 · no fix planned: Red Hat Enterprise Linux 6, Red Hat Enterprise Linux 7, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9, … · updated 2026-09-10 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-4224.json)
