Skip to main content

Soup Sieve EUVDEUVD-2026-81690

| CVE-2026-85999 MEDIUM
Uncontrolled Resource Consumption (CWE-400)
2026-09-17 GitHub_M GHSA-j934-xhv5-fg8f
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Reach endpoint accepting user CSS selector
  2. Delivery
    Submit selector with long whitespace/comment run
  3. Exploit
    Trigger quadratic RE_WS_END.search during trimming
  4. Execution
    Exhaust CPU and hold GIL
  5. Impact
    Stall workers / deny service

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the application pass attacker-controlled CSS selectors into soupsieve.compile() or BeautifulSoup.select() on a vulnerable soupsieve (< 2.9); applications that use only hard-coded/static selectors are entirely unaffected, which is the primary limiting factor. The malicious input is itself a syntactically valid selector containing either a long internal whitespace run or a long CSS comment run followed by another token, which drives RE_WS_END.search into quadratic work during pre-tokenization trimming. No authentication or user interaction is needed at the library level (PR:N/UI:N), and impact is limited to availability (CPU/GIL/worker exhaustion) with no confidentiality or integrity effect.

Impact

This is a moderate-severity algorithmic-complexity denial of service (CWE-400), not a memory-corruption or code-execution flaw despite the misleading 'RCE'/'Buffer Overflow' tags - the description explicitly states there is no memory corruption or code execution. The vendor CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, 5.3) is internally consistent with a network-reachable, low-complexity, unauthenticated availability-only impact, and I concur with it. The 'network vector' is realistic only because attacker-controlled CSS selectors can reach the vulnerable trimming path via soupsieve.compile() or BeautifulSoup.select(); an app that only uses hard-coded selectors is not exploitable, which is the single most important real-world limiter. No EPSS score, no CISA KEV listing, and no explicit public exploit are provided, so this is not confirmed as actively exploited - however the fix commit ships regression tests (whitespace runs of 2000-20000 chars) that effectively function as a reproducible proof of the quadratic blowup. Overall this is a genuine but bounded worker-exhaustion risk for services that feed untrusted selectors to Beautiful Soup, and a low priority for the (majority) of deployments using only static selectors.

Exploit ScenarioDerived

An application exposes a search/scraping feature that passes a user-supplied CSS selector into BeautifulSoup.select() or soupsieve.compile(). The attacker submits a valid selector containing a very long internal whitespace run (e.g. 'a' + 20000 spaces + 'b') or a long CSS comment followed by a token, causing RE_WS_END.search to retry a greedy scan at every offset and consume quadratic CPU. Repeated requests hold the Python GIL and exhaust worker threads, stalling the service; no public exploit is identified but the patch's performance tests demonstrate the trigger input.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 17, 2026

Algorithmic-complexity denial of service in Soup Sieve versions prior to 2.9 allows remote attackers to exhaust CPU and stall Python services by supplying a valid CSS selector containing a long internal whitespace run, or a long CSS comment run followed by another token, to soupsieve.compile() or BeautifulSoup.select(). The pre-tokenization trimming step performs quadratic work against the attacker-controlled string, and because the parsing happens in-process it can hold the GIL and starve worker threads, though there is no memory corruption or code execution and no confidentiality or integrity impact (CVSS 5.3, AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L). Applications that only pass hard-coded, static selectors are entirely unaffected, and no public exploit code was identified at time of analysis. Vendor-released patch: 2.9.

RemediationAI

Upgrade Soup Sieve to 2.9, the vendor-released patch version (https://github.com/facelessuser/soupsieve/releases/tag/2.9), and rebuild or redeploy any container or virtualenv that pins soupsieve below 2.9, including transitive pins pulled in by Beautiful Soup 4; verify with pip show soupsieve or pip index/pip freeze that 2.9 or later is installed. If an immediate upgrade is not possible, the highest-leverage compensating control is to stop passing untrusted strings directly into soupsieve.compile() or BeautifulSoup.select(): enforce a strict server-side allowlist of selector patterns, or reject selectors containing long whitespace runs or CSS comment sequences, since applications using only hard-coded selectors are entirely unaffected and this fully removes exposure at the cost of reduced user flexibility. As a secondary control, cap the accepted selector length and the length of internal whitespace/comment runs before parsing; this bounds the quadratic work but can break legitimate complex selectors and is only a partial mitigation. Where per-request isolation is already available, execute selector parsing in a worker process or thread pool with a strict timeout and CPU quota so that GIL contention and worker exhaustion are contained to a single sandbox rather than the whole service; the trade-off is added latency and operational complexity. Network-layer filtering, rate limiting, and request size limits reduce the rate at which an attacker can drive the CPU-heavy path but do not address the underlying complexity, and any monitoring should watch for anomalous CPU spikes or request timeouts correlated with user-supplied selector parameters.

Affected VersionsENISA

soupsieve < 2.9

Affected Packages

pypi soupsieve fix: 2.9, 2.9.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

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

Technical ContextAI · show details

Soup Sieve is a CSS selector library used by Beautiful Soup 4 to translate CSS selectors into match operations, so any application that accepts user-supplied CSS selectors (filter builders, query APIs, admin search boxes) exposes this path. The root cause is a regular-expression design flaw rather than a memory-safety bug: prior to 2.9, selector_iter in src/soupsieve/css_parser.py trimmed trailing whitespace and comments with RE_WS_END, compiled from f'{WSC}*$' and invoked via search(). Because the pattern was end-anchored but evaluated with search(), the engine retried a greedy scan at every starting offset of the input, producing O(n^2) work before tokenization; a selector with a long whitespace run or a long CSS comment run followed by another token therefore inflates CPU time quadratically. This is CWE-400 (Uncontrolled Resource Consumption) in its algorithmic-complexity form, distinct from the separate IDENTIFIER/VALUE backtracking issue, because the cost is incurred during RE_WS_END trimming rather than during token matching. The upstream commit cf198fcddc9230f06ed39f974eba0ce076b85cda corrects this by rewriting the COMMENTS expression to r'(?:/\*(?:[^*]|\*(?!/))*\*/)' and replacing the end-anchored pattern with an anchored '^(?:[ \t]|(?:\n\r|(?!\n\r)[\n\f\r])|COMMENTS)*' match performed against the reversed selector string, with new performance regression tests at 2000, 4000, 8000, 16000 and 20000 spaces. The CVE record carries misleading tags ('RCE', 'Buffer Overflow') that are not supported by the technical evidence: the impact is confined to availability through CPU/GIL exhaustion, with no memory corruption or code execution.

Know when Soupsieve 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 (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 5.3 MEDIUM

Network-reachable via user-supplied selectors with low complexity and no auth/interaction; availability-only impact (worker/CPU exhaustion), no confidentiality or integrity effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
SUSE MEDIUM
Red Hat 5.3 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

2
Patch available
Sep 17, 2026 - 16:02 EUVD
CVE Published
Sep 17, 2026 - 15:23 cve.org
MEDIUM 5.3

DescriptionCVE.org

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, selector_iter in src/soupsieve/css_parser.py trims the raw selector with RE_WS_END, an end-anchored WSC whitespace-and-comment expression used with search(), so the regular expression engine retries a greedy scan at every starting offset. An attacker-controlled valid selector containing a long internal whitespace run, or a selector containing a long CSS comment run followed by another token, causes quadratic CPU work before tokenization. User-controlled selectors can reach the path through soupsieve.compile() and BeautifulSoup.select(), while applications using only hard-coded selectors are unaffected. This root cause is separate from the IDENTIFIER and VALUE backtracking vulnerability because the cost occurs in RE_WS_END.search during trimming rather than token matching. The resulting CPU consumption can hold the Python GIL, exhaust workers, and stall a service without causing memory corruption or code execution. The issue is fixed in version 2.9.

Threat Intelligence Overview

EPSS Score
0.4%
Top 71% exploitable
Prevalence
High
soupsieve is a required dependency of Beautiful Soup 4, one of the most-used Python libraries
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor 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 MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
High

Priority Score

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

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Module for Basesystem 15 SP7 Affected
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Server 16.0 Affected

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