<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Modules/pyexpat.c, branch 3.10</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/pyexpat.c?h=3.10</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/pyexpat.c?h=3.10'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2026-10-01T00:29:24Z</updated>
<entry>
<title>[3.10] gh-157953: Update bundled Expat to 2.8.5 (GH-157957) (#158327)</title>
<updated>2026-10-01T00:29:24Z</updated>
<author>
<name>Stan Ulbrych</name>
<email>stan@python.org</email>
</author>
<published>2026-10-01T00:29:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4fda06832e19cd3e5f8e20024584f33a362e0bbc'/>
<id>urn:sha1:4fda06832e19cd3e5f8e20024584f33a362e0bbc</id>
<content type='text'>
(cherry picked from commit 5f1f21894f56973078f170f6d0709b59a57605fd)
(cherry picked from commit 721007eeb8a182475d83061b131d3e85e43eee41)</content>
</entry>
<entry>
<title>[3.10] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (GH-149023) (#155611)</title>
<updated>2026-08-13T00:29:44Z</updated>
<author>
<name>Stan Ulbrych</name>
<email>stan@python.org</email>
</author>
<published>2026-08-13T00:29:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ea70712d1a8508e14e9677d44f838dab04dc0286'/>
<id>urn:sha1:ea70712d1a8508e14e9677d44f838dab04dc0286</id>
<content type='text'>
* [3.10] gh-149018: Use `XML_SetHashSalt16Bytes` in `pyexpat`/`_elementtree` when possible (GH-149023) (GH-155345)
(cherry picked from commit e37df2a6a71d6538698e2d3188a7c345b827640b)
(cherry picked from commit 95cf26d5796406bdd9ae216ae33bb0cd723af354)

Co-authored-by: Stan Ulbrych &lt;stan@python.org&gt;
(cherry picked from commit fc9b11ff49cbc82e6f917d07a61517a2b5f3145f)
(cherry picked from commit 24b8f12544468e4cedf5bfbe25442fcd495391e4)

* Fix SetHashSalt16Bytes assignment in pyexpat.c</content>
</entry>
<entry>
<title>[3.10] gh-90949: expose Expat API to tune exponential expansion protections (GH-139368) (#151401) (#155414)</title>
<updated>2026-08-10T19:53:35Z</updated>
<author>
<name>Stan Ulbrych</name>
<email>stan@python.org</email>
</author>
<published>2026-08-10T19:53:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=14c3f89d7ffecdb19f827b3fe789318d92ca49ca'/>
<id>urn:sha1:14c3f89d7ffecdb19f827b3fe789318d92ca49ca</id>
<content type='text'>
Expose the XML Expat 2.7.2 APIs to tune protections against
"billion laughs" [1] attacks.

The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:

- `parser.SetBillionLaughsAttackProtectionActivationThreshold(threshold)`, and
- `parser.SetBillionLaughsAttackProtectionMaximumAmplification(max_factor)`.

This completes the work in f04bea44c37793561d753dd4ca6e7cd658137553,
and improves the existing related documentation.

[1]: https://en.wikipedia.org/wiki/Billion_laughs_attack
(cherry picked from commit 666112376d574c7802646ee1df6244062671cd61)
(cherry picked from commit 19bc39127e5c916c42c54487a1ae68be76582f50)


(cherry picked from commit db195e38a499c837b3ea2cf0aa1c9383e76ddc80)

Co-authored-by: Bénédikt Tran &lt;10796600+picnixz@users.noreply.github.com&gt;
Co-authored-by: Hugo van Kemenade &lt;1324225+hugovk@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.10] gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (GH-145987) (#146002)</title>
<updated>2026-04-08T10:27:42Z</updated>
<author>
<name>Stan Ulbrych</name>
<email>stan@python.org</email>
</author>
<published>2026-04-08T10:27:42Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=af856a7177326ac25d9f66cc6dd28b554d914fee'/>
<id>urn:sha1:af856a7177326ac25d9f66cc6dd28b554d914fee</id>
<content type='text'>
* [3.10] 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 e5caf45faac74b0ed869e3336420cffd3510ce6e)

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

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

---------

Co-authored-by: Bénédikt Tran &lt;10796600+picnixz@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.10] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234) (#139532)</title>
<updated>2025-11-25T15:25:12Z</updated>
<author>
<name>Sebastian Pipping</name>
<email>sebastian@pipping.org</email>
</author>
<published>2025-11-25T15:25:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1173f8068b9a8c1168780532c466c391be10bf67'/>
<id>urn:sha1:1173f8068b9a8c1168780532c466c391be10bf67</id>
<content type='text'>
Co-authored-by: Bénédikt Tran &lt;10796600+picnixz@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>[3.10] gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat` (GH-139403) (#139613)</title>
<updated>2025-10-06T23:34:14Z</updated>
<author>
<name>Sebastian Pipping</name>
<email>sebastian@pipping.org</email>
</author>
<published>2025-10-06T23:34:14Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8ea678d6d160d620e951b2c00484ab31c25dc4d3'/>
<id>urn:sha1:8ea678d6d160d620e951b2c00484ab31c25dc4d3</id>
<content type='text'>
* gh-139400: Make sure that parent parsers outlive their subparsers in `pyexpat` (#139403)

* Modules/pyexpat.c: Disallow collection of in-use parent parsers.

Within libexpat, a parser created via `XML_ExternalEntityParserCreate`
is relying on its parent parser throughout its entire lifetime.
Prior to this fix, is was possible for the parent parser to be
garbage-collected too early.

(cherry picked from commit 6edb2ddb5f3695cf4938979d645f31d7fba43ec8)

* Move news item to from section "Core and Builtins" to section "Security"</content>
</entry>
<entry>
<title>[3.10] gh-115398: Expose Expat &gt;=2.6.0 reparse deferral API (CVE-2023-52425) (GH-115623) (GH-116270)</title>
<updated>2024-03-06T23:02:55Z</updated>
<author>
<name>Sebastian Pipping</name>
<email>sebastian@pipping.org</email>
</author>
<published>2024-03-06T23:02:55Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=516a6d4237fe3b9fb02a800b81a0a3153f78685e'/>
<id>urn:sha1:516a6d4237fe3b9fb02a800b81a0a3153f78685e</id>
<content type='text'>
Allow controlling Expat &gt;=2.6.0 reparse deferral (CVE-2023-52425) by adding five new methods:

- `xml.etree.ElementTree.XMLParser.flush`
- `xml.etree.ElementTree.XMLPullParser.flush`
- `xml.parsers.expat.xmlparser.GetReparseDeferralEnabled`
- `xml.parsers.expat.xmlparser.SetReparseDeferralEnabled`
- `xml.sax.expatreader.ExpatParser.flush`

Based on the "flush" idea from https://github.com/python/cpython/pull/115138#issuecomment-1932444270 .

Includes code suggested-by: Snild Dolkow &lt;snild@sony.com&gt;
and by core dev Serhiy Storchaka.

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
</entry>
<entry>
<title>[3.10] gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)" (GH-100745) (#100847)</title>
<updated>2023-01-08T13:35:40Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2023-01-08T13:35:40Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0e00bce5619003009255c638998d9878eedac106'/>
<id>urn:sha1:0e00bce5619003009255c638998d9878eedac106</id>
<content type='text'>
gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)" (GH-100745)

* gh-100689: Revert "bpo-41798: pyexpat: Allocate the expat_CAPI on the heap memory (GH-24061)"

This reverts commit 7c83eaa536d2f436ae46211ca48692f576c732f0.
(cherry picked from commit b034fd3e5926c63a681a211087b4c666834c7525)

Co-authored-by: Nikita Sobolev &lt;mail@sobolevn.me&gt;

Co-authored-by: Nikita Sobolev &lt;mail@sobolevn.me&gt;</content>
</entry>
<entry>
<title>bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)</title>
<updated>2021-10-02T13:21:55Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-10-02T13:21:55Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=22cf6a2f2347b7d4f11e45e557beace55acc79b5'/>
<id>urn:sha1:22cf6a2f2347b7d4f11e45e557beace55acc79b5</id>
<content type='text'>
(cherry picked from commit 0742abdc48886b74ed3b66985a54bb1c32802670)

Co-authored-by: TAGAMI Yukihiro &lt;tagami.yukihiro@gmail.com&gt;</content>
</entry>
<entry>
<title>bpo-43908: Make heap types converted during 3.10 alpha immutable (GH-26351) (GH-26766)</title>
<updated>2021-06-17T10:19:44Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2021-06-17T10:19:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7297d74251de3b1c02dcdb9ca281461cc7fb4535'/>
<id>urn:sha1:7297d74251de3b1c02dcdb9ca281461cc7fb4535</id>
<content type='text'>
* Make functools types immutable

* Multibyte codec types are now immutable

* pyexpat.xmlparser is now immutable

* array.arrayiterator is now immutable

* _thread types are now immutable

* _csv types are now immutable

* _queue.SimpleQueue is now immutable

* mmap.mmap is now immutable

* unicodedata.UCD is now immutable

* sqlite3 types are now immutable

* _lsprof.Profiler is now immutable

* _overlapped.Overlapped is now immutable

* _operator types are now immutable

* winapi__overlapped.Overlapped is now immutable

* _lzma types are now immutable

* _bz2 types are now immutable

* _dbm.dbm and _gdbm.gdbm are now immutable
(cherry picked from commit 00710e6346fd2394aa020b2dfae170093effac98)

Co-authored-by: Erlend Egeberg Aasland &lt;erlend.aasland@innova.no&gt;

Co-authored-by: Erlend Egeberg Aasland &lt;erlend.aasland@innova.no&gt;</content>
</entry>
</feed>
