Skip to content
OpenAdvisories

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
Alpine v3.24 python3 3.14.7-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
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

ReleasePackageFixed inAdvisory
Azure Linux 3 docbook5-style-xsl No fix yet —
Azure Linux 3 python3 3.12.9-14 —

Wolfi

ReleasePackageFixed inAdvisory
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

References