Description
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 3.0, the CSS_ESCAPES and IDENTIFIER regular-expression subpatterns can backtrack exponentially on runs of ambiguous digit escapes in an attribute-name or tag position of an otherwise valid selector. The failure occurs during selector compilation through soupsieve.compile() or Beautiful Soup select() before SELECTOR_LIMIT is applied, so an application that accepts untrusted selector strings can have a worker stalled by a short input. This issue is fixed in version 3.0.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| facelessuser | soupsieve | < 3.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | soupsieve | No fix yet | — |
| Ubuntu 26.04 LTS | soupsieve | No fix yet | — |
| Ubuntu 24.04 LTS | soupsieve | No fix yet | — |
| Ubuntu 22.04 LTS | soupsieve | No fix yet | — |
| Ubuntu 20.04 LTS | soupsieve | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | soupsieve | < 3.0.2 | 3.0.2 | GHSA-6655-6qjp-jx7x |