CVE-2026-6879

NameCVE-2026-6879
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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
pypy3 (PTS)bullseye7.3.5+dfsg-2+deb11u2vulnerable
bullseye (security)7.3.5+dfsg-2+deb11u5vulnerable
bookworm7.3.11+dfsg-2+deb12u3vulnerable
trixie7.3.19+dfsg-2vulnerable
forky, sid7.3.23+dfsg-1vulnerable
python2.7 (PTS)bullseye2.7.18-8+deb11u1vulnerable
python3.11 (PTS)bookworm3.11.2-6+deb12u8vulnerable
bookworm (security)3.11.2-6+deb12u3vulnerable
python3.13 (PTS)trixie3.13.5-2+deb13u3vulnerable
forky3.13.14-1vulnerable
sid3.13.15-1fixed
python3.14 (PTS)forky3.14.6-1vulnerable
sid3.14.7-1fixed
python3.9 (PTS)bullseye3.9.2-1vulnerable
bullseye (security)3.9.2-1+deb11u7vulnerable

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pypy3source(unstable)(unfixed)
python2.7sourcebullseye(unfixed)end-of-life
python2.7source(unstable)(unfixed)
python3.11source(unstable)(unfixed)
python3.13source(unstable)3.13.15-1
python3.14source(unstable)3.14.7-1
python3.9source(unstable)(unfixed)

Notes

[trixie] - python3.13 <no-dsa> (Minor issue)
[bookworm] - python3.11 <postponed> (Minor issue)
[bullseye] - python3.9 <postponed> (Minor issue)
[bullseye] - python2.7 <end-of-life> (EOL in bullseye LTS)
[trixie] - pypy3 <no-dsa> (Minor issue)
[bookworm] - pypy3 <postponed> (Minor issue)
[bullseye] - pypy3 <postponed> (Minor issue)
https://mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/
https://github.com/python/cpython/issues/152674
https://github.com/python/cpython/pull/152676
https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0 (main)
https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3 (v3.14.7)
https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db (v3.13.15)
https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70 (v3.11.16)

Search for package or bug name: Reporting problems