Vulnerability
CVE-2026-6879
`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.
42 advisories report this vulnerability, across 12 ecosystems.
Advisories
-
ALAS2023-2026-2122
Amazon Linux 2023 - ALAS2023-2026-2122: Low priority package update for python3.14
-
ALAS2023-2026-2123
Amazon Linux 2023 - ALAS2023-2026-2123: Low priority package update for python3.13
-
ALAS2023-2026-2124
Amazon Linux 2023 - ALAS2023-2026-2124: Low priority package update for python3.12
-
ALAS2023-2026-2125
Amazon Linux 2023 - ALAS2023-2026-2125: Low priority package update for python3.11
-
ALPINE-CVE-2026-6879
`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.…
- ALPINE-EDGE-CVE-2026-6879
-
AZL-94157
CVE-2026-6879 affecting package docbook5-style-xsl 1.79.2-11
-
AZL-94299
CVE-2026-6879 affecting package python3 for versions less than 3.12.9-14
- CGA-64mm-9x86-22m5
- CGA-7g6r-phc4-fvqh
- CGA-9jgp-r77x-m572
- CGA-9mh7-8r38-m8f8
- CGA-cgh3-r65w-2fvw
- CGA-qcv8-4xf6-7j4v
- CGA-rmhf-8xg5-hx99
- CGA-rpwc-gfvx-7h59
- CGA-vqx2-w8wp-m64v
- CGA-xmgx-m5w7-7qfr
-
CNA-CVE-2026-6879
Quadratic Behavior in xml.etree.ElementPath Index Predicates
-
DEBIAN-CVE-2026-6879
`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.…
-
OESA-2026-3252
python3 security update
-
OESA-2026-3253
python3 security update
-
OESA-2026-3254
python3 security update
-
OESA-2026-3396
python3 security update
-
OESA-2026-3433
python3 security update
-
RHSA-2026:48238
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:48246
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:48253
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:48278
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:48279
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:54534
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:54554
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
SUSE-SU-2026:4401-1
Security update for python313
-
SUSE-SU-2026:4411-1
Security update for python
-
SUSE-SU-2026:4633-1
Security update for python
-
SUSE-SU-2026:4743-1
Security update for python36
-
SUSE-SU-2026:4744-1
Security update for python3, python3-base, python3-doc
-
SUSE-SU-2026:4754-1
Security update for python3
-
SUSEVEX-CVE-2026-6879
`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.…
-
UBUNTU-CVE-2026-6879
`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.…
-
openSUSE-SU-2026:11748-1
python315-3.15.0~rc2-1.1 on GA media
-
openSUSE-SU-2026:11817-1
python313-3.13.15-1.1 on GA media
References
- https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81
- https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85
- https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70
- https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0
- https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db
- https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02
- https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3
- https://github.com/python/cpython/issues/152674
- https://github.com/python/cpython/pull/152676
- https://mail.python.org/archives/list/[email protected]/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/