Low severity · published Jul 28, 2026
CVE-2026-6879
Quadratic Behavior in xml.etree.ElementPath Index Predicates
2.0
CVSS
0.4%
EPSS
No
On KEV
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.
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 29% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
CP
CPython · Python Software Foundation
before 3.10.21; 3.11.0 before 3.11.16; 3.12.0 before 3.12.14; 3.13.0 before 3.13.15; 3.14.0 before 3.14.7; 3.15.0a1 before 3.15.0rc1 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-6879
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-6879
github.com
https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81
github.com
https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85
github.com
https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70
github.com
https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0
github.com
https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db
github.com
https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02
More from CPython
9.4
CVE-2026-115557
Distrust compromised intermediate certificates in ssl module
9.2
CVE-2026-19445
Use-after-free of a server-side SSLContext when sni_callback switches contexts
8.8
CVE-2026-3298
Out-of-bounds write in Windows asyncio.ProacterEventLoop.sock_recvfrom_into() when using nbytes
8.4
CVE-2026-82049
tarfile extraction filters allow file modification and content disclosure via hard link to symlink
8.2
CVE-2026-11972
tarfile opened in streaming mode mishandles EOF
