Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify endpoint parsing untrusted HTML with vulnerable selector
-
DeliveryCraft small document with thousands of bare siblings
-
ExploitSubmit markup to trigger quadratic :has(~) scan
-
ExecutionWorker consumes minutes of CPU per request
-
ImpactService availability degraded or worker pool exhausted
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 evaluate a selector containing a general sibling combinator ('~') nested inside :has() - for example div:has(a ~ b) - against HTML the attacker controls; this specific selector shape is the trigger. It is strongly amplified when the :has() anchor matches elements with many children and the right-hand side of the '~' is absent, which prevents short-circuiting and forces the full nested scan. Limiting factors that reduce real-world exposure: the adjacent-sibling form (div:has(a + b)) stays linear and is NOT affected, trusted-only document processing is NOT affected, and selectors whose inner combinator is tightly constrained (using '>' or '+') avoid the quadratic path. No authentication or user interaction is required to submit the malicious markup, but the developer must have authored a vulnerable-shaped selector for the condition to exist at all. |
| Impact | This is a genuine but bounded availability issue - a classic algorithmic-complexity denial of service (CWE-400/CWE-407), not a code-execution or data-exposure flaw. The provided CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L, 6.3) is internally consistent with the GHSA write-up: the attack is reachable over the network because the untrusted input is HTML markup, needs no privileges or user interaction, but carries an Attack Requirement (AT:P) because exploitation only works when the application itself evaluates a selector of the specific shape 'general-sibling combinator inside :has()' (e.g. div:has(a ~ b)) - a condition the attacker does not control. Impact is correctly scoped to availability-low (VA:L): the measured effect is a worker pinned for tens of seconds to minutes per request, not a full host outage. No CISA KEV entry and no EPSS score are present in the input, so there is no signal of active exploitation; the decision label is 'this_month' (not act_now/emergency), consistent with a real-but-not-urgent priority. A reproducible proof-of-concept with timing measurements is embedded in the GHSA advisory, so weaponization effort is trivial, but that is distinct from in-the-wild use. Net: a legitimate patch-this-cycle item for affected deployments, materially de-rated by the narrow precondition that the application must run a vulnerable-shaped selector over attacker-controlled HTML. |
| Exploit ScenarioDerived | An application uses soupsieve (via BeautifulSoup) to evaluate a fixed, developer-authored selector such as div:has(a ~ b) against HTML it receives from untrusted sources (uploaded documents, scraped pages, user-submitted content). An attacker submits a small (~56 KB) document containing a few thousand sibling <a> elements with no matching right-hand <b>, forcing an O(n²) sibling scan that occupies a worker for roughly a minute of CPU per request. A working proof-of-concept with timing measurements (837 ms at n=1000 rising to ~60 s at n=8000) is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 12, 2026
Matching a developer-authored selector that nests a general sibling combinator inside :has() - for example div:has(a ~ b) - against attacker-supplied HTML drives Soup Sieve (prior to 2.10) into quadratic sibling scanning, letting a small document with a few thousand sibling elements occupy a worker for minutes of CPU. It is a bounded algorithmic-complexity denial of service (CWE-400/CWE-407) that only materializes where an application evaluates such a fixed selector over untrusted markup; the adjacent-sibling form (div:has(a + b)) stays linear and trusted-only document processing is unaffected. No CISA KEV entry is associated with this issue, and a public PoC reference exists in the upstream GitHub advisory; it is not verified as working exploit code. Urgency is moderate (this_month per the priority decision label).
RemediationAI
Vendor-released patch: upgrade soupsieve to 2.10 (pip install --upgrade 'soupsieve>=2.10'), which introduces sibling caching for the general-sibling combinator under :has(); see the release notes at https://github.com/facelessuser/soupsieve/releases/tag/2.10, the fix commit https://github.com/facelessuser/soupsieve/commit/ffb88cca745c591224f74a8e86414a85e8f35fc0 and PR https://github.com/facelessuser/soupsieve/pull/304. Where upgrading is delayed, the vendor's guidance is to constrain the selectors your code evaluates rather than to expect linear behaviour: avoid broad anchors and especially '*' as the A in A:has(B), avoid anchors known to have very many children, and tighten the inner selector with '>' or '+' instead of '~' where the logic permits - the trade-off is that these rewrite the matching semantics and must be re-tested against your documents. If untrusted input cannot be paired with a constrained selector, reject input or selectors that use :has() outright (trade-off: loss of legitimate :has() functionality), and wrap selector evaluation in a timeout so a pathological document cannot hold the worker (trade-off: legitimate slow evaluations on very large documents may be aborted, requiring a threshold tuned per workload). Upstream notes that quadratic behaviour for some :has() cases is considered expected and that caching reduces but does not eliminate it, so the patch should be combined with selector review for internet-facing HTML processing.
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 library used with Beautiful Soup 4; selectors are parsed into a selector list and evaluated by css_match.py against a parsed tag tree. The :has() pseudo-class is evaluated relative-style through match_future_child, which walks every candidate element under the scope, and for each candidate the general-sibling branch of match_future_relations walks all of that candidate's following siblings. When the right-hand side of the '~' is absent, no short-circuit is possible: with n siblings the engine performs (n-1)+(n-2)+…+1 comparisons, i.e. O(n²) work - the CWE-400 uncontrolled resource consumption / CWE-407 inefficient algorithm class. The adjacent-sibling '+' branch only inspects the single immediately following sibling per candidate and therefore remains linear, so the cost is specific to '~' nested inside :has(). The 2.10 fix adds a per-parent sibling cache (sib_cache) and a match_general_sibling helper that remembers the index of the first matching sibling (or records that none exists) so repeated evaluations no longer rescan the sibling run; the changelog describes it as a performance fix for '~'. Note that upstream explicitly frames quadratic :has() behaviour as by design, with caching as an optimization rather than a guarantee. The trigger requires a specific selector shape and a document where the '~' right-hand side is missing; the exact per-element behaviour for every anchor shape is not described in the available sources.
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
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Network-reachable via untrusted HTML with no auth or interaction (AV:N/PR:N/UI:N), but AC:H because it only triggers when the app uses a general-sibling-in-:has() selector; impact is availability-only (A:L).
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 2.10, matching a developer-authored selector that places the general sibling combinator inside :has() repeatedly scans each candidate element's following siblings when the right-hand side is absent, producing quadratic work on attacker-controlled HTML. Applications that evaluate a fixed selector such as div:has(a ~ b) over untrusted markup can have a worker occupied for minutes by a small document, while the adjacent sibling form and trusted-only document processing are not affected in the same way. This issue is fixed in version 2.10.
Blast Radius
ecosystem impact- 48 pypi packages depend on soupsieve (36 direct, 12 indirect)
Ecosystem-wide dependent count for version 2.10.0.
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-124557
GHSA-4j63-6c4x-wfg4
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB