Quadratic Behavior in xml.etree.ElementPath Index Predicates
Key facts
- Attack vector
- Network
- Privileges required
- High
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-407.
Summary
`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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Python Software Foundation | CPython | before 3.10.21; 3.11.0 to before 3.11.16; 3.12.0 to before 3.12.14; 3.13.0 to before 3.13.15; 3.14.0 to before 3.14.7; 3.15.0a1 to before 3.15.0rc1 | 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, 3.15.0rc1 | Patch available | CNA |
- CPython VendorPython Software Foundation Affected before 3.10.21; 3.11.0 to before 3.11.16; 3.12.0 to before 3.12.14; 3.13.0 to before 3.13.15; 3.14.0 to before 3.14.7; 3.15.0a1 to before 3.15.0rc1 Fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, 3.15.0rc1 Patch available CNA
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:python:*:*:*:*:*:*:*:* | — | — | python-pillow |
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:* Versions — — ·python-pillow
Remediation
- Fix · CNA CPython (Python Software Foundation) Fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, 3.15.0rc1
Red Hat 7 advisories
- RHSA-2026:54554 Released 2026-08-13 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.13-3.13.15-1.hum1@aarch64, python3.13-3.13.15-1.hum1@src, python3.13-3.13.15-1.hum1@x86_64 +16
- RHSA-2026:54534 Released 2026-08-13 · Red Hat rating ImportantRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python-unversioned-command-3.14.7-1.hum1@noarch@public-hummingbird-aarch64-rpms, python-unversioned-command-3.14.7-1.hum1@noarch@public-hummingbird-x86_64-rpms, python3-3.14.7-1.hum1@aarch64 +28
- RHSA-2026:48279 Released 2026-07-29 · Red Hat rating LowRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.12-3.12.13-3.8.hum1@aarch64, python3.12-3.12.13-3.8.hum1@src, python3.12-3.12.13-3.8.hum1@x86_64 +12
Show 4 more Red Hat advisories
- RHSA-2026:48278 Released 2026-07-29 · Red Hat rating LowRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.13-3.13.14-1.7.hum1@aarch64, python3.13-3.13.14-1.7.hum1@src, python3.13-3.13.14-1.7.hum1@x86_64 +16
- RHSA-2026:48253 Released 2026-07-29 · Red Hat rating LowRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.11-3.11.15-5.5.hum1@aarch64, python3.11-3.11.15-5.5.hum1@src, python3.11-3.11.15-5.5.hum1@x86_64 +12
- RHSA-2026:48246 Released 2026-07-29 · Red Hat rating LowRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python3.10-3.10.20-3.2.hum1@aarch64, python3.10-3.10.20-3.2.hum1@src, python3.10-3.10.20-3.2.hum1@x86_64 +12
- RHSA-2026:48238 Released 2026-07-29 · Red Hat rating LowRed Hat Hardened Images RPMs Security Update
- Red Hat Hardened Images python-unversioned-command-3.14.6-2.2.hum1@noarch@public-hummingbird-aarch64-rpms, python-unversioned-command-3.14.6-2.2.hum1@noarch@public-hummingbird-x86_64-rpms, python3-3.14.6-2.2.hum1@aarch64 +28
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Hardened Images | Fixed | RHSA-2026:48238, RHSA-2026:48246, RHSA-2026:48253, RHSA-2026:48278, RHSA-2026:48279 |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-6879
- 2026-10-03 Alias added: GHSA-77qw-3xm6-r2pp
References
Patch 8
- https://github.com/python/cpython/pull/152676
- https://github.com/python/cpython/commit/2ffab083782968a4d732738f4f1dff6bbd69d2b0
- https://github.com/python/cpython/commit/02c08e6b747ac43d0d866a4ffa916bedf3423f81
- https://github.com/python/cpython/commit/390337b8ba1658833fdef379e1739c9f9533a8db
- https://github.com/python/cpython/commit/cb409342a19f25656f62e679f8bac265fe1442c3
- https://github.com/python/cpython/commit/96510a3758f4a075f43223afdee3b6ee1a7a7f02
- https://github.com/python/cpython/commit/037965c00a427cba5c05447efadc67c51a492e85
- https://github.com/python/cpython/commit/0583f24ae678993e3f7939f51ad5bcae5ad9dc70
Advisory 1
More Python Software Foundation vulnerabilities
- TI-2024-07037 Quadratic complexity parsing cookies with backslashes CVSS 3.1HIGH 7.5
- TI-2024-11791 Bypass extraction filter to modify file metadata outside extraction directory CVSS 3.1MEDIUM 5.3
- TI-2024-00411 Quoted zip-bomb protection for zipfile CVSS 3.1MEDIUM 6.2
- TI-2026-13296 `HTTPPasswordMgr` can send saved HTTPS credentials via HTTP because of incorrect scheme matching CVSS 4.0MEDIUM 6.0
- TI-2024-06422 Email header injection due to unquoted newlines CVSS 3.1MEDIUM 5.5
- TI-2026-04606 Possible to hijack modules in current working directory CVSS 4.0MEDIUM 5.6
Sources
- CVE-2026-6879 · CVE Program
- CVE-2026-6879 · NVD
- FIRST EPSS
- GHSA-77qw-3xm6-r2pp · GitHub Advisory Database · CC BY 4.0
- CVE-2026-6879 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences