CVE-2026-6879: Python2.7 · Element.findall() and fully-consumed Element.iterfind() exhibit O(n^2) time complexity when
Affects python2.7Source GCVE Database
Not known to be exploited · CVSS 2.0 Low.
Data as of 25 Nov 2026, 14:04 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 21% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 28 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 25 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10pypy3pkg:deb/ubuntu/pypy3?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.10python3.14pkg:deb/ubuntu/python3.14?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSpypy3pkg:deb/ubuntu/pypy3?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSpython3.14pkg:deb/ubuntu/python3.14?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSpypy3pkg:deb/ubuntu/pypy3?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSpython3.12pkg:deb/ubuntu/python3.12?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2026-6879 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2026-6879 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/7YMZ6DDZVR26TJJBVO3RDNBAVGHNYAKR/ (opens in a new tab)
- github.com/python/cpython/issues/152674 (opens in a new tab)
- github.com/python/cpython/pull/152676 (opens in a new tab)
- github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0 (opens in a new tab)