Description
`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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Python Software Foundation | CPython | < 3.10.21, 3.11.0 – < 3.11.16, 3.12.0 – < 3.12.14, 3.13.0 – < 3.13.15, 3.14.0 – < 3.14.7, 3.15.0a1 – < 3.15.0rc1 | 3.10.21 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pypy3 | 8.0.0+dfsg-1 | — |
| Debian 14 | python3.14 | 3.14.7-1 | — |
| Debian 13 | pypy3 | No fix yet | — |
| Debian 13 | python3.13 | 3.13.5-2+deb13u5 | — |
| Debian 12 | pypy3 +1 | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pypy3 +1 | No fix yet | — |
| Ubuntu 26.04 LTS | pypy3 +1 | No fix yet | — |
| Ubuntu 24.04 LTS | pypy3 +1 | No fix yet | — |
| Ubuntu 22.04 LTS | pypy3 +1 | No fix yet | — |
| Ubuntu 20.04 LTS | pypy3 | No fix yet | — |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | python2.7 +1 | No fix yet | — |
| Ubuntu Pro 20.04 LTS | python2.7 +2 | No fix yet | — |
| Ubuntu Pro 18.04 LTS | python2.7 +3 | No fix yet | — |
| Ubuntu Pro 16.04 LTS | python2.7 +1 | No fix yet | — |
| Ubuntu Pro 14.04 LTS | python2.7 +2 | No fix yet | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Hardened Images 1 | python3 +15 | 3.14.6-2.2.hum1 | RHSA-2026:54534, RHSA-2026:48238 |
| Red Hat Hardened Images 1 | python3.10 +6 | 3.10.20-3.2.hum1 | RHSA-2026:48246 |
| Red Hat Hardened Images 1 | python3.11 +6 | 3.11.15-5.5.hum1 | RHSA-2026:48253 |
| Red Hat Hardened Images 1 | python3.12 +6 | 3.12.13-3.8.hum1 | RHSA-2026:48279 |
| Red Hat Hardened Images 1 | python3.13 +8 | 3.13.14-1.7.hum1 | RHSA-2026:54554, RHSA-2026:48278 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | python +1 | 2.7.18-150000.133.1 | SUSE-SU-2026:4411-1 |
| SLES 15 SP7 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLES 15 SP6 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLES 15 SP5 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLES 15 SP4 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLES 12 SP5 | python +2 | 2.7.18-33.88.1 | SUSE-SU-2026:4633-1 |
| SLES 12 SP5 | python3 +1 | 3.4.10-25.199.1 | SUSE-SU-2026:4744-1 |
| SLES 12 SP5 | python36 +1 | 3.6.15-125.1 | SUSE-SU-2026:4743-1 |
Show 9 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 3 | python313 +1 | 3.13.15-150700.4.56.1 | SUSE-SU-2026:4401-1 |
| SLES for SAP 15 SP6 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLES for SAP 15 SP5 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLES for SAP 15 SP4 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLE Micro 5.5 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLE Micro 5.4 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLE Micro 5.3 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLE HPC 15 SP5 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
| SLE HPC 15 SP4 | python3 +1 | 3.6.15-150300.10.129.1 | SUSE-SU-2026:4754-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python313 | 3.13.15-1.1 | openSUSE-SU-2026:11817-1 |
| openSUSE Tumbleweed | python315 | 3.15.0~rc2-1.1 | openSUSE-SU-2026:11748-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | python3 | 3.14.7-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2023 | python3.11 +6 | 3.11.16-1.amzn2023.0.1 | ALAS2023-2026-2125 |
| Amazon Linux 2023 | python3.12 +6 | 3.12.14-2.amzn2023.0.1 | ALAS2023-2026-2124 |
| Amazon Linux 2023 | python3.13 +8 | 3.13.15-1.amzn2023.0.1 | ALAS2023-2026-2123 |
| Amazon Linux 2023 | python3.14 +13 | 3.14.7-1.amzn2023.0.1 | ALAS2023-2026-2122 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | docbook5-style-xsl | No fix yet | — |
| Azure Linux 3 | python3 | 3.12.9-14 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | python-3.10 | 3.10.21-r0 | — |
| Wolfi rolling | python-3.11 | 3.11.16-r0 | — |
| Wolfi rolling | python-3.12 | 3.12.14-r0 | — |
| Wolfi rolling | python-3.13 | 3.13.15-r0 | — |
| Wolfi rolling | python-3.14 | 3.14.7-r0 | — |
Advisories 19
- SUSE-SU-2026:4754-1 Security update for python3 SUSE / openSUSE Security Updates · Oct 21, 2026
- SUSE-SU-2026:4743-1 Security update for python36 SUSE / openSUSE Security Updates · Oct 20, 2026
- SUSE-SU-2026:4744-1 Security update for python3, python3-base, python3-doc SUSE / openSUSE Security Updates · Oct 20, 2026
- RHSA-2026:54554 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 16, 2026
- RHSA-2026:54534 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 16, 2026
- SUSE-SU-2026:4633-1 Security update for python SUSE / openSUSE Security Updates · Oct 13, 2026
- RHSA-2026:48246 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:48279 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:48238 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:48278 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- RHSA-2026:48253 Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update Red Hat Security Advisories (RHSA) · Oct 6, 2026
- SUSE-SU-2026:4411-1 Security update for python SUSE / openSUSE Security Updates · Oct 2, 2026
- SUSE-SU-2026:4401-1 Security update for python313 SUSE / openSUSE Security Updates · Oct 1, 2026
- openSUSE-SU-2026:11817-1 python313-3.13.15-1.1 on GA media SUSE / openSUSE Security Updates · Sep 19, 2026
- openSUSE-SU-2026:11748-1 python315-3.15.0~rc2-1.1 on GA media SUSE / openSUSE Security Updates · Sep 11, 2026
- ALAS2023-2026-2122 Low: python3.14 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 31, 2026
- ALAS2023-2026-2123 Low: python3.13 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 31, 2026
- ALAS2023-2026-2124 Low: python3.12 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 31, 2026
- ALAS2023-2026-2125 Low: python3.11 security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 31, 2026
References
- https://github.com/python/cpython/pull/152676 patch
- https://github.com/python/cpython/issues/152674 issue-tracking
- https://mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/ vendor-advisory
- https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0 patch
- https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81 patch
- https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db patch
- https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3 patch
- https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02 patch
- https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85 patch
- https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70 patch