CVE-2026-85999: Soup Sieve: Polynomial-time ReDoS (O(n²)) in the whitespace/comment trimming regex `RE_WS_END` (triggers on VALID selectors)
Vulnerability summary
CVE-2026-85999 is a medium (CVSS 5.3) Uncontrolled Resource Consumption vulnerability in facelessuser soupsieve. EPSS estimates a 0.61% chance of exploitation in the next 30 days, higher than 49.2% of scored vulnerabilities.
Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 4 · Related 4Timeline
- 17-09-2026PublishedVulnerability first disclosed.
- 22-09-2026Last modifiedVulnerability information updated.
Description
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, selector_iter in src/soupsieve/css_parser.py trims the raw selector with RE_WS_END, an end-anchored WSC whitespace-and-comment expression used with search(), so the regular expression engine retries a greedy scan at every starting offset. An attacker-controlled valid selector containing a long internal whitespace run, or a selector containing a long CSS comment run followed by another token, causes quadratic CPU work before tokenization. User-controlled selectors can reach the path through soupsieve.compile() and BeautifulSoup.select(), while applications using only hard-coded selectors are unaffected. This root cause is separate from the IDENTIFIER and VALUE backtracking vulnerability because the cost occurs in RE_WS_END.search during trimming rather than token matching. The resulting CPU consumption can hold the Python GIL, exhaust workers, and stall a service without causing memory corruption or code execution. The issue is fixed in version 2.9.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · PypiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · UbuntuEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · DebianEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · WolfiEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- OSV · ChainguardEcosystem advisory · calculated5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- NVDNIST5.3MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS trend
Probability
0.61%
Chance of exploitation in the next 30 days
Percentile
49%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.61% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource.
- CWE-1333Inefficient Regular Expression ComplexityThe product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard12 products
- airflow-2< 2.11.2-r22
- datadog-agent-7.77-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.78-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.79-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.80-core-integrationsAll versions (No fix recorded)
Wolfi6 products
- datadog-agent-7.77-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.78-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.79-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.80-core-integrationsAll versions (No fix recorded)
- datadog-agent-7.81-core-integrationsAll versions (No fix recorded)
Debian1 product
- soupsieveAll versions (No fix recorded)
Facelessuser1 product
- soupsieve< 2.9
PyPI1 product
- soupsieve< 2.9.0
Ubuntu1 product
- soupsieveAll versions (No fix recorded)
6 vendors · 22 products
References
11 links- github.com/facelessuser/soupsieve/security/advisories/GHSA-j934-xhv5-fg8fX Refsource CONFIRMWEBREPORTAdvisory
- github.com/facelessuser/soupsieve/commit/cf198fcddc9230f06ed39f974eba0ce076b85cdaX Refsource MISCWEBREPORTFIX
- pypi.org/project/soupsievePACKAGE