HIGH · CVSS 3.1 7.5 EPSS 0.6% · 45th percentile CWE-1333

CVE-2026-126191: Soup Sieve: Exponential ReDoS in selector compilation via \9-run in CSS_ESCAPES/IDENTIFIER

Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-6655-6qjp-jx7x

Summary

Soup Sieve is vulnerable to an exponential Regular Expression Denial of Service (ReDoS) flaw triggered by specifically crafted CSS escape sequences during selector compilation. Engineering teams utilizing libraries that compile untrusted CSS selector strings must update their dependencies immediately.

Who is affected

The vulnerability affects applications that process user-supplied CSS selectors, such as web scraping services, no-code platforms, or custom query builders. An attacker can supply a small input string, approximately 60 bytes in length, to cause significant resource exhaustion and hang the processing worker during the compilation phase.

Exploitability

The vulnerability is rated as High severity (CVSS 7.5) due to its potential to cause a full denial of service via network access without requiring authentication. With an EPSS score of 0.004, the likelihood of exploitation is low, and the vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
PyPI soupsieve >= 0, < 3.0.2 3.0.2 python -m pip install 'soupsieve>=3.0.2'

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionNone
ScopeUnchanged
ConfidentialityNone
IntegrityNone
AvailabilityHigh

FAQ

Is this the same vulnerability as previous Soup Sieve ReDoS reports?

No, this is a distinct vector targeting the IDENTIFIER/CSS_ESCAPES regex, which is separate from the previously patched vulnerabilities involving the VALUE regex and comma-list parsing.

Why should I avoid version 3.0.0 or 3.0.1 if they are newer than 2.9.2?

These versions were yanked from the PyPI registry; users must upgrade specifically to version 3.0.2 or higher to ensure the patch is correctly applied and stable.

Does this flaw affect all BeautifulSoup users?

It only impacts users whose applications allow untrusted, external input to be passed into CSS selector compilation functions, such as those used in scraping or query-building tools.

Original advisory description
### Summary The IDENTIFIER/CSS_ESCAPES regex (css_parser.py:119-124) exhibits exponential backtracking on a run of ambiguous digit-escapes (`\9`) in an attribute-name or tag position of an otherwise well-formed selector. It fires at compile time (before the SELECTOR_LIMIT guard) via the public `soupsieve.compile()` and BeautifulSoup `.select()`. ### PoC (verified on soupsieve 2.9.2) import soupsieve as sv sv.compile('[a' + '\\9'*26 + '=x]') # ~57 bytes -> ~10s; ~16x time per +4 chars ### Novelty Distinct from the patched GHSA-836r-... (VALUE regex) and GHSA-2wc2-... (comma-list) advisories, which are fixed in 2.9.2; this is a different regex/vector. ### Reachability CSS selectors are usually developer-controlled, so exposure requires an application that compiles UNTRUSTED selector strings (web-scraping-as-a-service, no-code/query builders, user-defined extraction rules). Where selectors are user-supplied, a ~60-byte string hangs the worker. ### Note This issue was fixed in version 3.0.0, which has been yanked from the PyPI registry. Use versions 3.0.2 and above to upgrade.

References

Source records: GHSA-6655-6qjp-jx7x (OSV.dev) · EPSS by FIRST, 2026-11-26.