Skip to content

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

Merged
kumaraditya303 merged 3 commits intopython:3.13from
miss-islington:backport-eb0e8be-3.13
Mar 16, 2026
Merged

[3.13] gh-145986: Avoid unbound C recursion in conv_content_model in pyexpat.c (CVE 2026-4224) (GH-145987)#145996
kumaraditya303 merged 3 commits intopython:3.13from
miss-islington:backport-eb0e8be-3.13

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Mar 15, 2026

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)

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

… `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)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@picnixz picnixz enabled auto-merge (squash) March 15, 2026 21:51
@picnixz picnixz disabled auto-merge March 15, 2026 21:54
@picnixz
Copy link
Member

picnixz commented Mar 15, 2026

@StanFromIreland In 3.13, we don't have the skip_if_unlimited_stack_size decorator, could you remove it? TiA:

@picnixz picnixz added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 15, 2026
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 54309bf 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F145996%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
@picnixz
Copy link
Member

picnixz commented Mar 15, 2026

Since we are removing the decorators I'm checking that the build bots are green. You can do the same for the other backports, TiA!

@StanFromIreland
Copy link
Member

@kumaraditya303 kumaraditya303 merged commit 196edfb into python:3.13 Mar 16, 2026
109 of 117 checks passed
@miss-islington miss-islington deleted the backport-eb0e8be-3.13 branch March 16, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants