CVE-2026-126191: Soup Sieve Denial of Service Vulnerability
HIGHCVE-2026-126191 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Soup Sieve libraries in the PyPI ecosystem. The issue involves exponential redos in selector compilation via \9-run in css_escapes/identifier. Remediation is available by upgrading affected packages to version 3.0.2.
CVE-2026-126191 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-126191
To remediate this vulnerability, upgrade all affected Soup Sieve dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install soupsieve>=3.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show soupsieve
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-126191, inspect your installed packages using pip:
pip show soupsieve
Analyze the terminal output to locate any version of Soup Sieve in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.2), your application is affected.
Note: The pip show soupsieve command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Soup Sieve, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-126191 Affected Soup Sieve Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
soupsieve
|
PyPI |
< 3.0.2
|
3.0.2
|
References
Frequently Asked Questions
What is CVE-2026-126191?
Which Soup Sieve versions are affected?
What version fixes CVE-2026-126191?
Is soupsieve affected?
What is the CVSS score of CVE-2026-126191?
What CWE is associated with CVE-2026-126191?
How can I check PyPI dependencies for CVE-2026-126191?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6655-6qjp-jx7x",
"modified" : "2026-11-13T16:39:43Z",
"published" : "2026-11-13T16:39:43Z",
"aliases" : [ "CVE-2026-126191" ],
"summary" : "Soup Sieve: Exponential ReDoS in selector compilation via \\9-run in CSS_ESCAPES/IDENTIFIER",
"details" : "### Summary\nThe 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()`.\n\n### PoC (verified on soupsieve 2.9.2)\n\n import soupsieve as sv\n sv.compile('[a' + '\\\\9'*26 + '=x]') # ~57 bytes -> ~10s; ~16x time per +4 chars\n\n### Novelty\nDistinct 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.\n\n### Reachability\nCSS 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.\n\n### Note\nThis 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "soupsieve"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.10"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/facelessuser/soupsieve/security/advisories/GHSA-6655-6qjp-jx7x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-126191"
}, {
"type" : "WEB",
"url" : "https://github.com/facelessuser/soupsieve/pull/300"
}, {
"type" : "WEB",
"url" : "https://github.com/facelessuser/soupsieve/commit/dbfa2854ff31a863326bd6660d4e55c6f068db9e"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/facelessuser/soupsieve"
}, {
"type" : "WEB",
"url" : "https://github.com/facelessuser/soupsieve/releases/tag/3.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1333" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-11-13T16:39:43Z",
"nvd_published_at" : "2026-11-12T17:17:32Z"
}
}