Impact
Soup Sieve is a CSS selector parser used with Beautiful Soup, and before version 2.8.4 its parser allocates unbounded memory when compiling selector lists that contain many comma‑separated items. If an attacker can supply a crafted selector to soupsieve.compile(), .select(), or .select_one(), the library expands the list and consumes hundreds of megabytes of heap memory from a comparatively small input string. This causes the process to run out of memory, leading to a denial of service. The weakness corresponds to CWE‑400 and CWE‑770.
Affected Systems
Soup Sieve, a pure‑Python library authored by facelessuser, is the product impacted. Versions prior to 2.8.4 contain the flaw. The library integrates with Beautiful Soup 4 in many Python projects that parse HTML and may expose the parser to user‑supplied selectors. Any application that calls soupsieve.compile() or Beautiful Soup’s .select()/.select_one() with external input can use the vulnerability.
Risk and Exploitability
The CVSS score is 7.5, indicating high severity, while the EPSS score is below 1%, indicating low but non‑zero likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog. An attacker only needs to supply a large, comma‑separated selector string; no special privileges are required. The resulting attack causes a memory exhaustion denial of service, with no potential for code execution or data exfiltration.
OpenCVE Enrichment
Github GHSA