Skip to main content

CPython CVE-2026-6879

| EUVDEUVD-2026-49850 LOW
Inefficient Algorithmic Complexity (CWE-407)
2026-07-28 PSF GHSA-77qw-3xm6-r2pp
2.0
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft XML with many siblings
  2. Delivery
    Submit to vulnerable application
  3. Exploit
    XPath predicate evaluation triggers O(n^2) processing
  4. Execution
    High CPU consumption
  5. Impact
    Service unavailability

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

The attack requires that the application uses Element.findall(), iterfind(), or find() with XPath index predicates (such as [1] or [last()]) on XML input containing many same-tag siblings. Additionally, the attacker must have high privileges to deliver the crafted XML, and user interaction is required (e.g., loading the file or triggering parsing). The attack vector is network (AV:N) but with high complexity and prerequisites. No default configuration is exploitable without these specific conditions.

Impact

CVSS 4.0 base score 2.0 indicates very low severity, with AV:N/AC:H/AT:P/PR:H/UI:P and only VA:L impact. No EPSS, KEV, or public exploit information is available. The high attack complexity, required high privileges, and user interaction make this a low real-world risk despite the potential for denial of service. The risk is only relevant in environments where untrusted XML with many siblings is processed via XPath index predicates in vulnerable CPython versions.

Exploit ScenarioDerived

An attacker crafts an XML document with thousands of identical sibling elements and an XPath expression like .//item[last()]. This document is loaded by a vulnerable application (requiring high privileges and user interaction), causing ElementFind() to perform repeated full scans and consume excessive CPU, leading to denial of service.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 28, 2026

Quadratic time complexity in CPython's xml.etree.ElementTree.findall(), iterfind(), and find() methods allows denial of service when processing XML documents with many same-tag siblings and XPath index predicates. Affected versions are CPython before 3.15.0. No active exploitation or public exploit identified at time of analysis.

RemediationAI

Upgrade to CPython version 3.15.0 or apply the commit 2ffab083782968a4d732738f4f1dff6bbd69d2b0. Workarounds include avoiding the use of XPath index predicates (e.g., [1], [last()]) on XML documents with many same-tag siblings, or using alternative traversal methods like direct iteration. The patch adds caching to eliminate the quadratic behavior.

Affected VersionsENISA

CPython 0 <3.15.0

Affected Packages

euvd cpython fix: 3.15.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability lies in the ElementPath implementation within CPython's xml.etree.ElementTree module, which lacks caching for XPath index predicates like [1] or [last()]. When iterating over a large number of sibling elements, each predicate evaluation triggers a full search of the sibling list, leading to O(n^2) time complexity. This is an algorithmic inefficiency related to CWE-400 (Uncontrolled Resource Consumption). The affected product is CPython (CPE: cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*), the reference implementation of Python.

Know when Cpython gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (PSF) PRIMARY 2.0 LOW
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

Primary rating from Vendor (PSF) · only source for this CVE.

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
High
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Ubiquitous
CPython is the default Python interpreter in most environments
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment MSRC GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-17084 MEDIUM POC
6.0 Aug 18

Integrity bypass in CPython's stringprep module causes divergent domain name normalization when processing international

CVE-2026-19445 CRITICAL
9.2 Sep 30

A use-after-free in CPython's ssl module lets a remote, unauthenticated TLS client crash a Python TLS server process - o

CVE-2026-6100 CRITICAL
9.1 Apr 13

CPython decompression modules (lzma, bz2, gzip) allow memory corruption via use-after-free when decompressor instances a

CVE-2026-3298 HIGH
8.8 Apr 21

Out-of-bounds buffer write in CPython's asyncio.ProactorEventLoop (Windows only) allows remote attackers to trigger memo

CVE-2026-11972 HIGH
8.2 Jun 23

Denial of service in CPython's tarfile module allows remote attackers to trigger an infinite loop by supplying a crafted

CVE-2026-9669 HIGH
8.2 Jun 08

Stack-based buffer overflow in CPython's bz2.BZ2Decompressor allows remote attackers to crash Python applications by sen

CVE-2026-11940 HIGH
7.8 Jun 23

Path traversal in CPython's tarfile module allows a crafted tar archive to bypass the 'data' and 'tar' extraction filter

CVE-2026-19553 HIGH
7.6 Sep 30

Certificate hostname verification is silently skipped in CPython's TLS stack when an application enables SSLContext.chec

CVE-2026-4786 HIGH
7.0 Apr 13

Command injection in CPython's webbrowser.open() API bypasses previous CVE-2026-4519 mitigation via specially crafted UR

CVE-2026-4519 HIGH
7.0 Mar 20

The webbrowser.open() API in CPython accepts URLs with leading dashes, which certain web browsers interpret as command-l

CVE-2026-7774 MEDIUM
6.9 Jun 04

Path traversal in CPython's tarfile module allows malicious tar archives to bypass the data_filter safety mechanism and

CVE-2026-19672 MEDIUM
6.3 Aug 19

CPython's tarfile module on POSIX platforms creates empty directories outside the intended extraction destination when p

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy