]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c...
authorStan Ulbrych <stan@python.org>
Wed, 8 Apr 2026 10:27:39 +0000 (11:27 +0100)
committerGitHub <noreply@github.com>
Wed, 8 Apr 2026 10:27:39 +0000 (11:27 +0100)
commit642865ddf4b232da1f3b1f7abcfa3254c4bfe785
treef10904d4a4517e25722b3d36b80f73b75b01344c
parent0d046dec11be36e432f32c48c63d00ba41afd440
[3.11] gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (GH-145987) (#146000)

* [3.11] gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (GH-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 eb0e8be3a7e11b87d198a2c3af1ed0eccf532768)
(cherry picked from commit e5caf45faac)

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>
Lib/test/test_pyexpat.py
Misc/NEWS.d/next/Security/2026-03-14-17-31-39.gh-issue-145986.ifSSr8.rst [new file with mode: 0644]
Modules/pyexpat.c