CVE-2026-6879 Details
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.
A vulnerability exists in the CPython XML processing module, specifically within the 'Element' class methods 'findall()', 'iterfind()', and 'find()'. When these methods are used with XPath index predicates on XML documents containing numerous same-tag siblings, they can exhibit quadratic time complexity. This issue arises particularly with predicates like '[1]', '[last()]', and '[last()-N]'. The 'find()' method's performance degradation occurs only when the first matching sibling is located towards the end of the list.
The vulnerability has been addressed in CPython. Users should upgrade to the latest version.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No CVSS 3.x data is available for this CVE.
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 28, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-407 | Inefficient Algorithmic Complexity | CISA-ADP |
Affected Products
No affected product data is available for this CVE.
Change History
8 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 13, 2026 | CVE Modified | [email protected] |
| Aug 11, 2026 | CVE Modified | [email protected] |
| Aug 6, 2026 | CVE Modified | [email protected] |
| Aug 5, 2026 | CVE Modified | [email protected] |
| Aug 5, 2026 | CVE Modified | [email protected] |
| Jul 30, 2026 | CVE Modified | [email protected] |
| Jul 28, 2026 | CVE Modified | CISA-ADP |
| Jul 28, 2026 | New CVE Received | [email protected] |