Skip to content

[3.10] gh-145986: Avoid unbound C recursion in conv_content_model in pyexpat.c (CVE 2026-4224) (GH-145987) - #146002

Merged
pablogsal merged 3 commits into
python:3.10from
StanFromIreland:backport-e5caf45-3.10
Apr 8, 2026
Merged

pablogsal merged 3 commits into
python:3.10from
StanFromIreland:backport-e5caf45-3.10

Conversation

@StanFromIreland

@StanFromIreland StanFromIreland commented Mar 15, 2026 •

Copy link
Copy Markdown
Member

Fix C stack overflow (CVE-2026-4224) when an Expat parser with a registered ElementDeclHandler parses inline DTD containing deeply nested content model.


(cherry picked from commit eb0e8be) (cherry picked from commit e5caf45)

…del` in `pyexpat.c` (CVE 2026-4224) (pythonGH-145987)

Fix C stack overflow (CVE-2026-4224) when an Expat parser
with a registered `ElementDeclHandler` parses inline DTD
containing deeply nested content model.

---------
(cherry picked from commit eb0e8be)
(cherry picked from commit e5caf45)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@StanFromIreland StanFromIreland added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 15, 2026
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @StanFromIreland for commit d013b14 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F146002%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 15, 2026
@pablogsal
pablogsal merged commit af856a7 into python:3.10 Apr 8, 2026
10 checks passed
@StanFromIreland
StanFromIreland deleted the backport-e5caf45-3.10 branch April 8, 2026 10:29
icanhasmath pushed a commit to ActiveState/cpython that referenced this pull request Oct 28, 2026
…del` in `pyexpat.c` (CVE 2026-4224) (pythonGH-145987) (python#146002)

* [3.10] pythongh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (pythonGH-145987)

Fix C stack overflow (CVE-2026-4224) when an Expat parser
with a registered `ElementDeclHandler` parses inline DTD
containing deeply nested content model.

---------
(cherry picked from commit eb0e8be)
(cherry picked from commit e5caf45)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

* Update Misc/NEWS.d/next/Security/2026-03-14-17-31-39.gh-issue-145986.ifSSr8.rst

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
(cherry picked from commit af856a7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants