CVE-2026-126193 — Soupsieve — CWE-674
CVE-2026-126193 is a MEDIUM severity security vulnerability (CWE-674) (CVSS 5.3/10) affecting Soupsieve. Technical vector analysis shows that an attacker can exploit this flaw remotely over the network without authentication (PR:N) with zero user interaction (UI:N), posing a direct security risk to affected deployments.
📄 Official NVD / MITRE Original Record Text
## Summary The Soup Sieve CSS selector parser recurses once per level of nested pseudo-class selector (`:is()`, `:not()`, `:where()`, `:has()`) without any limit on nesting depth. An unauthenticated attacker who can supply a CSS selector string to `soupsieve.compile()`, `soupsieve.select()`, or Beautiful Soup's `soup.select()` / `soup.select_one()` can force the parser to exceed Python's recursion limit with a small crafted input (about 1.6 KB, roughly 330 nesting levels), raising an uncontrolled `RecursionError`. Because this exception is not part of the parser's documented error contract, applications that catch only `ValueError` or `SelectorSyntaxError` see an unexpected failure of the request or task that parsed the selector. ## Root Cause The parser dispatches each opening pseudo-class token to `parse_pseudo_open`, which calls back into `parse_selectors` to parse the pseudo-class body. Every nesting level therefore adds Python stack frames, and no counter, depth guard, or `RecursionError` handler bounds this descent. The token-count guard `SELECTOR_LIMIT = 8192` (added for the earlier comma-separated-list memory issue) counts parsed tokens, not recursion depth; at the failing nesting depth the token count is only about 330, roughly four percent of that limit, so the guard never fires. The security invariant that untrusted selector input must not be able to exhaust interpreter resources is not enforced for nesting depth. ```text soupsieve/css_parser.py CSSParser.par
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-126193
CVSS 5.3/10 · MEDIUM · 13.11.2026
CWE: CWE-674
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 WHAT IS THIS VULNERABILITY?
Authentication Bypass
Summary: ## Summary
The Soup Sieve CSS selector parser recurses once per level of nested pseudo-class selector (:is(), :not(), :where(), :has()) without any limit on nesting depth. An unauthenticated attacker who can supply a CSS selector string to soupsieve.compile(), soupsieve.select(), or Beautiful Soup's soup.select() / soup.select_one() can force the parser to exceed Python's recur…
Affected: soupsieve
⚡ ATTACK CHAIN
1. JWT: change alg to none, remove signature.
2. SQL bypass: ' OR '1'='1'-- in login form.
3. Direct API endpoint access without auth headers.
4. Password reset token prediction or race condition.
5. Credential stuffing with default creds.
🔧 Tools: jwt_tool, Burp Suite, Hydra, sqlmap --forms
🗺️ MITRE ATT&CK: T1078 (Valid Accounts), T1110 (Brute Force)
🌍 REAL WORLD IMPACT
🛡️ REMEDIATION
→ Apply vendor security update for soupsieve.
→ Add MFA, strengthen sessions, implement rate limiting.
→ Pre-patch: put service behind VPN or apply IP allowlist.
→ Add WAF rule, create IDS alert for anomalous traffic.
⚠️ URGENCY
📋 Routine update cycle (30 days)
────────────────────────────────────────
[Kural Tabanlı Otomatik Güvenlik Analizi]