<Vulnerability name="CVE-2026-6879">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Low</ThreatSeverity>
    <PublicDate>2026-07-28T13:46:30</PublicDate>
    <Bugzilla id="2508122" url="https://bugzilla.redhat.com/show_bug.cgi?id=2508122" xml:lang="en:us">
python: Python: Performance degradation in XML processing due to quadratic time complexity
    </Bugzilla>
    <CVSS3 status="verified">
        <CVSS3BaseScore>2.2</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:L</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-770</CWE>
    <Details xml:lang="en:us" source="Mitre">
`Element.findall()` and fully-consumed `Element.iterfind()` exhibit `O(n^2)` time complexity when using XPath index predicates (e.g. `[1]`, `[last()]`, `[last()-N]`) on XML documents with many same-tag siblings. `Element.find()` is only affected when the first match is near the end  of the sibling list, such as with `[last()]` or `[last()-N]`;  `.//item[1]` short-circuits after the first match.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Python's xml.etree.ElementPath component. This vulnerability can lead to a denial of service (DoS) when processing specially crafted XML documents. Specifically, certain XPath index predicates used with functions like Element.findall() and Element.iterfind() can cause the processing time to increase quadratically with the size of the input, making the system unresponsive. A remote attacker could exploit this by providing a malicious XML file, potentially disrupting service availability.
    </Details>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-29T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48238">RHSA-2026:48238</Advisory>
        <Package name="python3-14-main">python3-14-main-3.14.6-2.2.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-29T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48246">RHSA-2026:48246</Advisory>
        <Package name="python3-10-main">python3-10-main-3.10.20-3.2.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-29T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48253">RHSA-2026:48253</Advisory>
        <Package name="python3-11-main">python3-11-main-3.11.15-5.5.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-29T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48278">RHSA-2026:48278</Advisory>
        <Package name="python3-13-main">python3-13-main-3.13.14-1.7.hum1</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:hummingbird:1">
        <ProductName>Red Hat Hardened Images</ProductName>
        <ReleaseDate>2026-07-29T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:48279">RHSA-2026:48279</Advisory>
        <Package name="python3-12-main">python3-12-main-3.12.13-3.8.hum1</Package>
    </AffectedRelease>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-6879
https://nvd.nist.gov/vuln/detail/CVE-2026-6879
https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0
https://github.com/python/cpython/issues/152674
https://github.com/python/cpython/pull/152676
https://mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/
    </References>
</Vulnerability>