Skip to main content

CPython csv module EUVDEUVD-2026-55630

| CVE-2026-18503 LOW
Inefficient CPU Computation (CWE-1176)
2026-08-10 PSF GHSA-2345-wr3r-cxf2
2.4
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

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

  1. Access
    Submit crafted quoted CSV via application upload
  2. Delivery
    Application passes unbounded sample to csv.Sniffer.sniff()
  3. Exploit
    Regex heuristic triggers quadratic backtracking
  4. Execution
    CPU core saturated
  5. Impact
    Degraded service availability

Vulnerability Assessment

Weakness
CWE
Exploitation Conditions

Exploitation requires that the target application explicitly calls csv.Sniffer.sniff() with attacker-supplied data and does not cap the length of the sample before the call. The CVSS 4.0 vector specifies AV:L (local attack surface from the library's own perspective), PR:L (low privileges - the attacker must be able to submit input to the application), and UI:P (passive user interaction - the application must invoke sniff() on the input). Exploitation is further limited by the absence of any confidentiality or integrity impact; the sole effect is transient CPU saturation rated at low availability impact. Applications that specify a CSV dialect explicitly, truncate input to a fixed maximum length, or process CSV only from trusted internal sources are not exploitable. The vulnerability does not affect CSV parsing itself - only the auto-detection path in Sniffer.sniff().

Impact

Available risk signals converge on low severity. The CVSS 4.0 base score of 2.4 (AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L) indicates local attack vector, low privilege requirement, passive user interaction, and only low availability impact with no confidentiality or integrity exposure. No CISA KEV listing exists and no public exploit or proof-of-concept is known. The 'Information Disclosure' tag applied to this CVE appears inconsistent with the description, which documents only CPU exhaustion - defenders should treat that tag as potentially mislabeled and not infer any data-exfiltration risk. Real-world exploitability is constrained to applications that (a) call csv.Sniffer.sniff() on user-supplied data and (b) impose no input length limits before that call. Applications that specify a CSV dialect explicitly or validate input size are not affected. The low CVSS availability impact rating further bounds the practical denial-of-service radius to degraded performance rather than outright service failure on modern multi-core systems.

Exploit ScenarioDerived

An attacker uploads a specially crafted CSV file composed of deeply nested quoted fields to a web application that uses csv.Sniffer.sniff() to auto-detect the file's format before processing. Because the application passes the full file content to sniff() without a size cap, the regex-based heuristic engages in quadratic backtracking, monopolizing a CPU core for the duration and degrading response times for other users. No public proof-of-concept is known, but the algorithmic nature of the flaw means it is straightforward to reproduce given knowledge of the regex patterns.

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

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

Alert me

AnalysisAIv1 – Aug 10, 2026

Super-linear regular-expression complexity in CPython's csv.Sniffer.sniff() allows CPU exhaustion when applications pass attacker-controlled, unbounded CSV input to dialect detection. Any Python application that auto-detects CSV formats from user-supplied data without input length limits is potentially affected across all CPython versions predating the 3.16 fix. No public exploit is identified at time of analysis, and the CVSS 4.0 score of 2.4 reflects a low-severity, local-context vulnerability with limited availability impact.

RemediationAI

The upstream fix is available in GitHub PR #153694 (https://github.com/python/cpython/pull/153694), which replaces the regex-based Sniffer heuristics with a trial-parsing algorithm that runs in linear time. A released, tagged CPython version containing this fix has not been independently confirmed - the change targets Python 3.16, which had not shipped at time of analysis. Until a patched release is available, the primary compensating control is to enforce a strict byte-length limit on any input passed to csv.Sniffer.sniff() - for example, capping samples at a few kilobytes - which eliminates the super-linear growth path with negligible functionality trade-off. Alternatively, specify the CSV dialect explicitly via csv.reader(f, delimiter=',') rather than relying on auto-detection, which avoids the vulnerable code path entirely. Applications that cannot adopt either approach should restrict CSV upload functionality to authenticated, rate-limited users to reduce abuse potential.

Affected VersionsENISA

CPython 3.15.0a1 <3.15.0rc1
CPython 3.14.0 <3.14.7
CPython 0 <3.13.15

Affected Packages

euvd cpython fix: 3.13.15, 3.14.7, 3.15.0rc1

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 is rooted in CWE-1176 (Inefficient Regular Expression Complexity) within CPython's standard library csv.py Sniffer class. Prior to the fix, sniff() deduced CSV dialects using regex-based heuristics that matched isolated character fragments and analyzed character frequencies. This approach exhibited super-linear - potentially quadratic - time complexity on CSV samples containing quoted fields, because the regex engine could backtrack extensively on crafted inputs. The fix, visible in GitHub PR #153694, replaces the entire heuristic engine with an incremental trial-parsing approach: it iterates over plausible combinations of delimiter, quotechar, and escapechar, parses sample windows, eliminates clearly inferior combinations early, and expands the window progressively. The Python 3.16 What's New document explicitly states the old implementation 'takes quadratic time on quoted samples.' CPE cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:* covers all CPython versions.

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.4 LOW
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
vuln.today AI 2.8 LOW

Local vector fits a library flaw; PR:L and UI:R reflect that an application with low-privilege input must invoke sniff(); only low availability impact applies.

3.1 AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:L
4.0 AV:L/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (PSF).

CVSS VectorVendor: PSF

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
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

Attacker-controlled CSV samples can trigger super-linear regular-expression work during dialect sniffing and consume significant CPU when applications pass unbounded input to csv.Sniffer.sniff().

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Ubiquitous
CPython is the reference Python runtime, deployed across virtually all server 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.1%
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
Small
Automatable
No
Human Impact· derived
High
Technical Impact
Partial

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
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-115557 CRITICAL
9.4 Oct 24

CPython's ssl module validates TLS certificate chains that anchor to known-compromised eMudhra CA certificates, so anyon

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-114583 MEDIUM
6.9 Oct 22

CPython's tarfile.tar_filter extraction filter can be bypassed with crafted link members, allowing a malicious tar archi

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