Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit tiny deeply-nested HTML/XML document
-
ExploitApplication runs descendant-combinator selector on it
-
ExecutionTrigger polynomial O(n^(k+1)) ancestor re-walk
-
ImpactExhaust CPU and stall worker for seconds to minutes
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | Exploitation requires the application to (1) use selectors containing one or more descendant combinators (space-separated, e.g. 'section div div') - not the child combinator 'a > b', which only inspects the parent and is unaffected; (2) execute those selectors via Soup Sieve's select()/select_one() or Beautiful Soup's css.select()/CSS APIs; and (3) run them against HTML or XML that an untrusted user can influence (scrapers, sanitizers, filters, uploaded/fetched-markup services). The attacker needs only a tiny, deeply nested document (~1 KB) where the leftmost selector part never matches, so every walk reaches the document root. Limiting factors: applications that process only trusted documents are not affected; the impact is CPU/worker exhaustion (availability only), not code execution or data exposure; and on the fixed 4.0 release, selectors explicitly compiled with the NOCACHE flag remain vulnerable because they keep the old uncached matching. |
| Impact | All signals align on a genuine but bounded availability risk. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H, score 7.5) describes a remotely reachable, low-complexity, unauthenticated flaw with impact confined to availability - no confidentiality or integrity loss - consistent with CWE-407 (polynomial-time algorithmic complexity) and the GHSA title 'Polynomial-time denial of service in the descendant combinator.' The vuln.today priority is 'this_week' (not act_now/emergency). No CISA KEV listing is present in the input, so this is not confirmed as actively exploited; no EPSS score is provided, so exploitation probability cannot be quantified. A runnable proof-of-concept is published directly in the GHSA advisory (a few-line script plus a benchmark table showing a ~1 KB input stalling a worker for close to a minute), so the barrier to reproduction is effectively zero even though it is not weaponized malware. One caveat tempers the raw CVSS: exploitability is entirely conditional on the application running selectors that contain descendant combinators against untrusted documents - the library is only a DoS vector in that usage, and apps that select only over trusted markup are unaffected, which the library-centric CVSS base score does not capture. Net: a real, prioritize-this-week hardening item for scrapers, sanitizers, and markup-processing services, but a targeted resource-exhaustion issue rather than a wormable or data-exposing one. |
| Exploit ScenarioDerived | An application (web scraper, HTML sanitizer/filter, or a service that ingests uploaded or fetched markup) runs a CSS selector containing descendant combinators such as 'section div div' via Beautiful Soup's select()/select_one()/css.select(). An attacker submits a very small, deeply nested document (about 1 KB of nested <div> with no matching leftmost element), forcing Soup Sieve to re-walk every ancestor for each combinator - O(n^(k+1)) work - and tie up the worker CPU for seconds to minutes. A working proof-of-concept is published in the GHSA advisory, so reproduction is trivial; the network attack vector and low complexity (AV:N/AC:L) mean no special timing or privileges are needed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 12, 2026
Polynomial-time denial of service in Soup Sieve's descendant-combinator matching lets a small, deeply nested HTML or XML document occupy a worker for seconds to minutes in any application that runs CSS selectors over untrusted markup. The Python library (pip package soupsieve) is affected at all versions prior to 4.0, including when used through Beautiful Soup 4's select(), select_one() and css.select() APIs; a selector such as 'section div div' against roughly 1 KB of nested elements is enough to stall a request, and each extra descendant combinator multiplies the cost. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) rates this as a remote, unauthenticated availability-only issue with no confidentiality or integrity impact, and severity is bounded because applications that only select over trusted documents are unaffected. The advisory ships a short Python timing snippet demonstrating the slowdown, but there is no CISA KEV listing and no reported active exploitation; the vendor has released 4.0 with per-element ancestor caching that restores linear behavior.
RemediationAI
Upgrade to soupsieve 4.0 or later (pip install 'soupsieve>=4.0'); the ancestor caching fix is on by default, so no configuration change is required beyond the upgrade, and results of existing selectors are unchanged. Do not rely on the NOCACHE flag as a mitigation: selectors compiled with NOCACHE keep the old uncached walk and remain subject to polynomial time, so remove NOCACHE from any selector that runs against untrusted input. If upgrading is not immediately possible, the vendor's stated workarounds are: minimize descendant combinators in selectors applied to untrusted documents, substituting the child combinator ('a > b') where the document structure is known - the trade-off is that '>' only inspects the immediate parent, so selectors written for arbitrary nesting depth must be rewritten and may miss matches at other levels; cap the size and nesting depth of untrusted documents before selecting on them, at the cost of rejecting or truncating some legitimate deeply nested markup; and run selection on untrusted input inside a worker process that can be killed on a time limit, which adds process-management overhead and latency but bounds the CPU burn. Because this is availability-only with no confidentiality or integrity impact, prioritization should focus on internet-facing services that feed user-supplied markup into Beautiful Soup. Advisory and patch references: https://github.com/facelessuser/soupsieve/security/advisories/GHSA-mmhr-3c5m-f64f and https://github.com/facelessuser/soupsieve/releases/tag/4.0.
Affected VersionsENISA
Affected Packages
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 pure-Python CSS selector engine used as Beautiful Soup 4's selector backend, and the flaw is an algorithmic-complexity weakness (CWE-407) in how it evaluates the descendant combinator (the space in 'a b'). To match 'a b', the engine checks each element against 'b' and then walks upward through every ancestor looking for one matching 'a'; with additional descendant combinators, the remainder of the selector is re-evaluated from each ancestor on that walk, and nothing was reused between walks. The cost therefore scales as O(n^(k+1)) over a chain of n nested elements with k descendant combinators, so doubling nesting depth multiplies runtime roughly by 2^(k+1). The worst case is a selector whose leftmost component never matches (e.g. 'section div div' over nested divs with no section), because every walk runs to the document root with no early exit. The vendor fix, in the commit against soupsieve/css_match.py, introduces an ancestor-result cache (anc_cache, keyed by element and relation identity) that records whether each element visited is or has a matching ancestor, making each descendant combinator linear in document size; this is enabled by default, while selectors compiled with the NOCACHE flag deliberately retain the original uncached walk. The adjacent child combinator ('a > b') only inspects the immediate parent and is not affected.
Know when the next one hits your stack
- 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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attacker-supplied document reaches the parser over the network with no auth or interaction (AV:N/AC:L/PR:N/UI:N); only CPU/worker availability is harmed (A:H, C:N/I:N), scope unchanged.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 4.0, Soup Sieve repeatedly walks the same ancestors while matching descendant combinators, and each additional descendant combinator raises the polynomial degree of the work on deeply nested attacker-influenced HTML or XML. Applications using selectors such as section div div through select(), select_one(), or Beautiful Soup CSS APIs against untrusted documents can have a worker occupied for seconds or minutes, while trusted-only document processing is not affected. Selectors compiled with NOCACHE continue to use the old uncached behavior. This issue is fixed in version 4.0.
Technical POC Analysis
CWE-407 (Inefficient Algorithmic Complexity): polynomial-time denial of service in Soup Sieve's descendant-combinator matching.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
A denial-of-service vulnerability in the Soup Sieve library affects all versions prior to 4.0, allowing a remote, unauthenticated attacker to stall web workers by submitting small, deeply nested HTML or XML that is processed with certain CSS selectors. Any application using Beautiful Soup's select() methods on untrusted input is at risk, potentially causing service degradation or outages that impact availability and customer trust.
No vendor-released patch identified at time of analysis. Interim mitigations include strict input validation and sanitization of untrusted HTML/XML, limiting document nesting depth and size, avoiding complex descendant combinators on untrusted input, and implementing rate limiting or resource quotas for CSS selector operations.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-124549
GHSA-mmhr-3c5m-f64f
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB