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

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

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

CVSS VectorVendor: PSF

Attack Vector
Network
Attack Complexity
High
Privileges Required
High
User Interaction
P
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Jul 28, 2026 - 15:19 vuln.today
Analysis Generated
Jul 28, 2026 - 15:19 vuln.today
CVE Published
Jul 28, 2026 - 13:46 cve.org
LOW 2.0

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.

AnalysisAI

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.

Technical ContextAI

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.

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.

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-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

CVE-2026-7210 MEDIUM
6.3 May 11

XML parsers in CPython's xml.parsers.expat and xml.etree.ElementTree modules use insufficient entropy for Expat hash-flo

CVE-2026-3276 MEDIUM
6.3 Jun 03

Denial-of-service via quadratic algorithmic complexity in CPython's unicodedata.normalize() affects all CPython versions

CVE-2026-17084 MEDIUM POC
6.0 Aug 18

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

Share

CVE-2026-6879 vulnerability details – vuln.today

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