Skip to main content

Soup Sieve CVE-2026-126193

| EUVDEUVD-2026-124559 MEDIUM
Uncontrolled Recursion (CWE-674)
2026-11-12 security-advisories@github.com GHSA-7g44-g9rc-x53w
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 deeply nested pseudo-class selector
  2. Exploit
    Parser recurses once per nesting level
  3. Execution
    Exceed CPython recursion limit, raise RecursionError
  4. Impact
    Uncaught exception fails the request/task

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation requires that the application pass attacker-controlled CSS selector strings into Soup Sieve's public API (soupsieve.compile(), soupsieve.select()) or Beautiful Soup's soup.select()/soup.select_one(); selectors are supplied to these functions, not to the parsed document, so the failure occurs at parse time before any markup is matched. Per the CVSS vector no authentication, privilege, or user interaction is needed (PR:N/UI:N), and the ~1.6 KB nested-pseudo-class payload works against default CPython (recursion limit 1000). The decisive limiting factor is deployment pattern: most applications use fixed, developer-authored selectors rather than untrusted ones, so they are unaffected. A secondary limiter is error handling - callers that wrap selector parsing in a handler catching RecursionError (or a broad except Exception) absorb the failure, whereas those following the documented ValueError/SelectorSyntaxError contract do not. Impact is bounded to the individual request/task, not a persistent or service-wide outage.

Impact

This is a low-to-moderate priority issue whose raw CVSS 5.3 overstates practical urgency for most deployments. The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) correctly reflects an unauthenticated, network-reachable, low-complexity trigger with only a limited availability impact and no confidentiality or integrity effect, consistent with the described behavior: a crafted ~1.6 KB selector with ~330 nested pseudo-classes (:is()/:not()/:where()/:has()) raises an uncontrolled RecursionError (CWE-674). No EPSS score and no KEV listing are provided in the input, so there is no signal of active exploitation; the GHSA advisory does include a reproducible proof-of-concept, so public PoC code exists even though wide exploitation is not evidenced. The vuln.today decision label is this_month, i.e. patch on a routine cycle rather than an emergency. The dominant mitigating signal is that impact is self-limited: the advisory and CVE description both state the RecursionError is a recoverable CPython stack unwind, not an interpreter crash or persistent/service-wide denial of service - the demonstrated effect is failure of the single request or task that parsed the malicious selector. Critically, real risk is gated on an application actually passing attacker-controlled selector strings into soupsieve.compile()/select() or BeautifulSoup .select()/.select_one(), which is not the typical usage pattern, so most deployments are not exposed despite the network vector.

Exploit ScenarioDerived

An application exposes a search or filtering feature that forwards a user-supplied CSS selector string into Beautiful Soup's soup.select() (backed by Soup Sieve). An unauthenticated attacker submits a ~1.6 KB selector consisting of ~330 nested :is(...) wrappers; parsing recurses one frame per nesting level, exceeds CPython's default recursion limit of 1000, and raises an uncontrolled RecursionError that is not caught by handlers written for the documented ValueError/SelectorSyntaxError contract, failing that request. A reproducible PoC is published in the GHSA advisory.

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

Deeply nested pseudo-class selectors in Soup Sieve 0.4 through 2.10 trigger uncontrolled recursion in the CSS parser, allowing an unauthenticated attacker who can supply a selector string to raise an unhandled RecursionError and fail the affected request or task. The impact is a recoverable per-request availability loss rather than an interpreter crash or persistent service-wide denial of service (CVSS 3.1 5.3, A:L only), and practical urgency is low to moderate because most applications use fixed developer-authored selectors. Soup Sieve 3.0 removes recursion from the parser and matcher; no CISA KEV listing indicates active exploitation, but the vendor advisory includes a reproducible proof-of-concept selector.

RemediationAI

Upgrade to soupsieve 3.0, the vendor-released fixed version; 3.0 reworks the parser and matcher to eliminate recursion, so the nested-pseudo-class input no longer exhausts the Python call stack. The vendor advisory is at https://github.com/facelessuser/soupsieve/security/advisories/GHSA-7g44-g9rc-x53w, with the fixing commit at https://github.com/facelessuser/soupsieve/commit/52de12f157a373614ad0f486d434551c5a4378ee and the pull request at https://github.com/facelessuser/soupsieve/pull/306. For older versions that must accept untrusted selectors, the advisory recommends wrapping selector compilation or selection in a handler that catches RecursionError (or a broad except Exception); the trade-off is that this only absorbs the per-request failure and does not fix the parser, and callers that catch only ValueError or SelectorSyntaxError will not catch it. Applications that do not accept attacker-controlled selector strings are not exposed and can schedule the upgrade through normal maintenance.

Affected VersionsENISA

soupsieve 0.4, < 3.0

Affected Packages

pypi soupsieve fix: 3.0, 3.0.2

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 Python CSS selector library used by Beautiful Soup to compile and evaluate CSS selectors. Its parser dispatches each opening pseudo-class token to parse_pseudo_open(), which calls back into parse_selectors() to parse the pseudo-class body, so every nesting level of :is(), :not(), :where() or :has() adds Python stack frames. CWE-674 applies because no depth counter or RecursionError handler bounds this descent; the existing SELECTOR_LIMIT of 8192 counts parsed tokens, and at the roughly 330 nesting levels needed to exceed CPython's default recursion limit the count is only about 330, so the guard never fires. The failure occurs at parse time before any markup is matched, and in CPython the RecursionError is a recoverable stack unwind, not an interpreter crash. Version 3.0 reworks the parser and matcher to eliminate recursion, makes :has() stricter by default, requires custom selectors to be defined in dependency order, and exposes a max_selectors parameter with a default limit of 8192.

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

Unauthenticated remote input (PR:N/UI:N) with a small reliable payload (AC:L); only a transient per-request availability loss (A:L) and no C/I impact.

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 for Beautiful Soup. From 0.4 until 3.0, deeply nested CSS pseudo-class selectors can cause recursive parsing to exceed Python’s recursion limit and raise  RecursionError . Applications accepting untrusted selectors may experience failure of the affected request or task if the exception is not handled. The demonstrated behavior is recoverable and does not establish an interpreter crash or persistent service-wide denial of service. This vulnerability is fixed in version 3.0.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
Prevalence
High
automatic dependency of Beautiful Soup 4, extremely widely used in Python
Threat Intel
1
1 sources
Social Media
2
Sightings
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

Attack Technique

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

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