Skip to main content

Soup Sieve EUVDEUVD-2026-124548

| CVE-2026-126189 MEDIUM
Inefficient Algorithmic Complexity (CWE-407)
2026-11-12 security-advisories@github.com
5.3
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Submit small crafted deeply-nested or wide HTML/XML
  2. Exploit
    Application runs fixed :has() selector via select()/select_one()
  3. Execution
    Quadratic descendant or child-combinator matching triggered
  4. Impact
    Worker CPU occupied seconds to minutes (DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Exploitation requires that the application itself use a :has() selector against attacker-influenced documents - specifically either a descendant relative selector such as div:has(p) or :has(em) (quadratic in nesting depth), or :has() on the parent side of a child combinator such as div:has(> p) > span (quadratic in sibling count) - invoked through select(), select_one(), or Beautiful Soup's css.select()/CSS APIs. These are ordinary selectors valid in default strict mode, so no unusual syntax or configuration is needed, but the application design must employ :has() and feed it untrusted HTML/XML. Limiting factors: applications that run such selectors only against trusted documents are unaffected; only versions prior to 4.0.1 are vulnerable; and after the 4.0.1 fix, selectors explicitly compiled with the NOCACHE flag retain the old quadratic behavior and should not be used with :has() on untrusted input.

Impact

This is a genuine but moderate-priority availability issue, not a high-CVSS-but-illusory one - though its real risk is tightly bounded by how the application uses the library. The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L, base 5.3) correctly captures a remotely reachable, low-complexity, unauthenticated flaw with only limited availability impact and no confidentiality or integrity effect (CWE-407, algorithmic complexity / quadratic-time DoS). No KEV listing is present and no EPSS score was supplied in the input, so there is no signal of active or widespread exploitation; the vuln.today decision label is 'this_month', consistent with a real-but-not-emergency defect. The GHSA advisory includes a working proof-of-concept DoS script and concrete before/after timings (e.g. 8,000 nested <div> matched by div:has(p) took 17.9s before the fix, 0.04s after), so exploitability is well-demonstrated even though it is not confirmed exploited in the wild. The important caveat is that this is a usage-dependent flaw: it only bites applications that run :has() selectors against attacker-influenced documents; the input Tag 'Information Disclosure' is incorrect, since the vector and advisory describe availability/CPU exhaustion, not data disclosure.

Exploit ScenarioDerived

A scraper, HTML sanitizer, or upload-processing service that runs a fixed :has() selector (e.g. div:has(p) or div:has(> p) > span) over documents a user controls receives a small but deeply nested or very wide HTML/XML payload. Quadratic matching ties up the worker process for seconds to minutes per request, and a working proof-of-concept exists in the GHSA advisory, so an attacker can cheaply exhaust worker capacity. Exploitation is low-complexity and needs no authentication per the CVSS vector.

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

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

Alert me

AnalysisAIv1 – Nov 12, 2026

Quadratic-time denial of service in Soup Sieve, the CSS selector library used by Beautiful Soup 4, affects versions prior to 4.0.1 when an application runs ordinary :has() selectors against attacker-influenced HTML or XML. A small crafted document - either deeply nested (against selectors such as div:has(p)) or with a large number of sibling children (against selectors such as div:has(> p) > span) - can occupy a worker for seconds to minutes; the vendor's advisory reports timings up to roughly 49 seconds for a 130 KB document on affected releases. Only applications that themselves use :has() against untrusted markup through select(), select_one(), or Beautiful Soup's CSS APIs are exposed, while applications that select only against trusted documents are unaffected; no confirmed in-the-wild exploitation or KEV entry is associated with this issue, and the advisory includes a short proof-of-concept script demonstrating the timing behaviour.

RemediationAI

Upgrade to soupsieve 4.0.1, the vendor-released fixed version, which enables the descendant and child-combinator match caches by default so no code changes are required beyond the version bump; then review your codebase for selectors compiled with the NOCACHE flag, because those deliberately retain the old uncached, quadratic matching and should not be used with :has() on untrusted input. If upgrading is not immediately possible, the vendor's workarounds are: do not run :has() with a descendant relative selector (:has(x)) or place :has() on the parent side of a child combinator (a:has(> x) > b) against untrusted documents; suppress the pseudo-class entirely per https://facelessuser.github.io/soupsieve/api/?h=ignore#ignore-pseudo-class, at the cost of losing :has() functionality; cap the size, nesting depth, and per-element child count of untrusted documents before selecting on them, which changes what markup you accept; or run selection on untrusted input inside a worker process that can be time-limited and terminated, which requires process supervision and abandonment of the in-flight parse. Note that the NOCACHE flag is described as a temporary fallback slated for removal, not a lasting mitigation.

Affected VersionsENISA

soupsieve < 4.0.1

Affected Packages

euvd soupsieve fix: 4.0.1

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

Soup Sieve implements CSS selector matching over Beautiful Soup tag trees, and CWE-407 (inefficient algorithmic complexity) is the root cause here: two matching strategies recomputed work that could have been reused. For :has() with a descendant relative selector, each candidate element's entire subtree was searched independently, so a chain of n nested elements cost O(n²) - with the worst case being no match at all, since no search could terminate early. Separately, matching a child combinator a > b checked every b and then re-tested its parent against a without caching, so a parent with n children was matched n times; when a itself contained :has(> x), each of those checks re-scanned all children, again producing O(n²) growth in sibling count. Both selectors are plain CSS Level 4 syntax permitted in the default strict mode, so nothing exotic is required of the application. The fix in 4.0.1 (PR #352, commit 0469c14, plus commit 305fbf6) adds a per-element, per-relation descendant match cache in soupsieve/css_match.py so a subtree searched once is not searched again, and caches child-combinator parent results; matching becomes linear in document size with results unchanged. Selectors explicitly compiled with the NOCACHE flag bypass the cache and retain the old quadratic behaviour.

Know when Python 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) 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

Remote untrusted document reaches the parser with no auth or interaction (AV:N/AC:L/PR:N/UI:N); impact is CPU/worker exhaustion only, so C:N/I:N and A:L, scope unchanged.

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
Red Hat 5.3 MEDIUM

Primary rating from Vendor (github).

CVSS VectorVendor: github

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
Nov 12, 2026 - 18:18 EUVD
CVE Published
Nov 12, 2026 - 17:17 cve.org
MEDIUM 5.3

DescriptionCVE.org

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 4.0.1, Soup Sieve repeatedly searches descendant subtrees for each candidate evaluated by :has() and repeatedly reevaluates a parent containing :has(> ...) for each child, causing quadratic matching on deeply nested or wide attacker-influenced HTML or XML. Applications using ordinary fixed selectors through select(), select_one(), or Beautiful Soup CSS APIs against untrusted documents can have a worker occupied for seconds or minutes, while applications that process only trusted documents are not affected. Selectors compiled with NOCACHE continue to use the old uncached behavior. This issue is fixed in version 4.0.1.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
High
mandatory dependency of Beautiful Soup 4, pervasive across Python scraping and parsing
Data Quality
5 sources
Confidence: Medium

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 No
EPSS 0.3%
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
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

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

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

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