# CVE-2026-126191: Soup Sieve CSS selector ReDoS via exponential backtracking

Source: https://junglewise.ai/threats/cve-2026-126191-soup-sieve-is-a-css-selector-library-designed-to-be-used-with  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-12. Updated: 2026-11-12  
License: CC BY 4.0 with a link back

CVE-2026-126191 · Severity: high · CVSS 7.5 · Published 2026-11-12

Soup Sieve is a CSS selector library used by Beautiful Soup 4 to parse HTML and XML documents. Prior to version 3.0, a malicious or malformed CSS selector can cause the selector compiler to consume excessive CPU and stall indefinitely due to exponential regular-expression backtracking. An application that accepts untrusted selector input can be subject to denial of service attacks with minimal input.

Technologies: [Facelessuser Soup Sieve](https://junglewise.ai/threats/technologies/soup-sieve). Vendors: [Facelessuser](https://junglewise.ai/threats/vendors/facelessuser).

## Quick answers

**Is CVE-2026-126191 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-126191 being exploited in the wild.

**How severe is CVE-2026-126191?** High severity, with a CVSS score of 7.5, published 12 November 2026.

**Which products and versions are affected?** Facelessuser Soup Sieve prior to 3.0.

**Is there a fix for CVE-2026-126191?** Yes: fixed in 3.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-126191 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-126191?** Check whether you run Facelessuser Soup Sieve at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.0

## Technical details

The vulnerability is a regular-expression denial of service (ReDoS) in the CSS_ESCAPES and IDENTIFIER regex subpatterns used during selector compilation. Attackers can craft selectors with ambiguous digit escapes in attribute-name or tag positions that trigger exponential backtracking. The flaw occurs in soupsieve.compile() or Beautiful Soup's select() method before the SELECTOR_LIMIT check is applied, allowing short inputs to cause a denial of service.

## Affected products

- facelessuser Soup Sieve prior to 3.0

## Timeline

- 2026-11-12: disclosed
- 2026-10-05: patched: Fix merged in PR #300 to reduce regex backtracking using atomic groups and possessive quantifiers

## References

- [https://github.com/facelessuser/soupsieve/commit/dbfa2854ff31a863326bd6660d4e55c6f068db9e](https://github.com/facelessuser/soupsieve/commit/dbfa2854ff31a863326bd6660d4e55c6f068db9e)
- [https://github.com/facelessuser/soupsieve/pull/300](https://github.com/facelessuser/soupsieve/pull/300)

## Related threats

- [Soup Sieve recursion error in CSS pseudo-class parsing](https://junglewise.ai/threats/cve-2026-126193-soup-sieve-is-a-css-selector-library-for-beautiful-soup-from-0-4)
- [Soup Sieve ReDoS via general sibling combinator in :has()](https://junglewise.ai/threats/cve-2026-126192-soup-sieve-is-a-css-selector-library-designed-to-be-used-with)
- [Soup Sieve polynomial DoS in descendant combinator matching](https://junglewise.ai/threats/cve-2026-126190-soup-sieve-is-a-css-selector-library-designed-to-be-used-with)
- [Soup Sieve quadratic ReDoS in CSS selector matching](https://junglewise.ai/threats/cve-2026-126189-soup-sieve-is-a-css-selector-library-designed-to-be-used-with)
- [facelessuser soupsieve ReDoS in CSS selector parser](https://junglewise.ai/threats/cve-2026-49477-facelessuser-soupsieve-redos-in-css-selector-parser)
