Skip to main content
EPSS 0.4%top 70%

CVE-2026-6879: Vulnerability in Python Software Foundation CPython

0
Low
Published: 07/28/2026 (07/28/2026, 13:46:30 UTC)
Source: CVE Database V5
Vendor/Project: Python Software Foundation
Product: CPython

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.

CVSS v4.0

Score 2.0low

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
High
User Interaction
Passive
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected software

Python Software Foundation

CPython

Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.15>=3.14.0 <3.14.7>=3.15.0a1 <3.15.0rc1
GitHub Actionsmore threats →cve
CPython
pkg:github/CPython
Affected versions
>=0 <3.10.21>=3.11.0 <3.11.16>=3.12.0 <3.12.14>=3.13.0 <3.13.15>=3.14.0 <3.14.7>=3.15.0a1 <3.15.0rc1

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/14/2026, 14:25:01 UTC

Technical Analysis

The vulnerability in CPython's XML ElementTree module causes Element.findall() and fully-consumed Element.iterfind() to have O(n^2) time complexity when XPath index predicates are used on XML documents containing many siblings with the same tag name. Element.find() is impacted only if the first matching element is near the end of the sibling list, such as with predicates like [last()] or [last()-N]. This inefficiency can degrade performance significantly when processing large XML documents with these query patterns.

Potential Impact

The impact is limited to degraded performance due to inefficient XML querying, which could lead to increased CPU usage and slower application response times when processing large XML documents with specific XPath predicates. There is no indication of a security breach, data corruption, or unauthorized access. The CVSS score of 2 and low severity rating reflect this limited impact.

Mitigation Recommendations

No official patch or remediation level has been published yet. Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, users should consider avoiding XPath index predicates on large XML documents or limit the size of sibling elements when using Element.findall() or Element.iterfind().

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
PSF
Date Reserved
2026-04-22T18:26:56.743Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a68beba9c2644c7f8c13fc5

Added to database: 07/28/2026, 14:37:46 UTC

Last enriched: 08/14/2026, 14:25:01 UTC

Last updated: 09/11/2026, 07:31:55 UTC

Views: 99

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses