CVE-2026-49477
HighCVSS 7.5Exploitation Probability (EPSS)
Elevated risk51th percentile - higher than 51% of all known CVEs
Summary
Soup Sieve library prior to version 2.8.4 contains a denial-of-service vulnerability due to a regular expression prone to catastrophic backtracking. An attacker can supply an untrusted CSS selector with an unterminated quoted attribute value, causing CPU exhaustion.
Risk Assessment
The organization is at risk of denial-of-service (DoS) attacks by sending a crafted CSS selector to soupsieve.compile() or Beautiful Soup .select()/.select_one(), potentially overloading the server and disrupting application availability.
Recommendation
Immediately upgrade Soup Sieve to version 2.8.4 or later. If an upgrade is not possible, restrict access to CSS selector processing functions to trusted sources only.
Other vulnerabilities in Soup Sieve
See all- CVE-2026-86000Medium
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.9, the selector parser in src/soupsieve/css_parser.py defines IDENTIFIER with adjacent quantified groups over overlapping character classes, and VALUE embeds IDENTIFIER for attribute selectors. When an attacker-controlled selector contains a long identifier or unquoted attribute-value run followed by input that makes the overall match fail, the regular expression engine explores quadratically many splits between the overlapping groups. User-controlled selectors can reach this path through soupsieve.compile(), soupsieve.select(), or BeautifulSoup.select(), while applications using only hard-coded selectors are unaffected. The resulting CPU consumption can hold the Python GIL, exhaust application workers, and stall a service; successful plain identifier matches are linear, and the issue does not cause memory corruption or code execution. The issue is fixed in version 2.9.
- CVE-2026-85999Medium
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.
- CVE-2026-49476High
Soup Sieve before version 2.8.4 allocates unbounded memory when compiling large comma-separated selector lists. An attacker can supply a crafted selector string to soupsieve.compile() or Beautiful Soup .select()/.select_one(), causing hundreds of megabytes of heap memory allocation and denial of service.
Original NVD description (English source)
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.8.4, the CSS selector parser in soupsieve contains a regular expression vulnerable to catastrophic backtracking when processing an attribute selector with an unterminated quoted value in soupsieve/css_parser.py, allowing an attacker who can supply untrusted CSS selector strings to soupsieve.compile() or Beautiful Soup .select() / .select_one() to cause CPU exhaustion and denial of service. This issue is fixed in version 2.8.4.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

