CVE-2026-49476

Soup Sieve: Memory Exhaustion via Large Comma-Separated Selector Lists in soupsieve

Published Jul 14, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
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 allocates unbounded memory when compiling large comma-separated selector lists, allowing an attacker who can supply a crafted selector string to soupsieve.compile() or Beautiful Soup .select() / .select_one() to allocate hundreds of megabytes of heap memory from a relatively small input and cause denial of service. This issue is fixed in version 2.8.4.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade soupsieve to version 2.8.4 or newer, which removes the unbounded allocation issue.
  • Validate and sanitize selector strings to reject lists that exceed a safe threshold of comma separators.
  • Restrict the exposure of selector parsing functions to trusted input only; if possible, remove or replace any user‑controlled selector usage in your codebase.

Generated by OpenCVE AI on July 31, 2026 at 04:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2wc2-fm75-p42x Soup Sieve has Memory Exhaustion via Large Comma-Separated Selector Lists
History
Type Values Removed Values Added
First Time appeared Facelessuser
Facelessuser soupsieve
Vendors & Products Facelessuser
Facelessuser soupsieve
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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 allocates unbounded memory when compiling large comma-separated selector lists, allowing an attacker who can supply a crafted selector string to soupsieve.compile() or Beautiful Soup .select() / .select_one() to allocate hundreds of megabytes of heap memory from a relatively small input and cause denial of service. This issue is fixed in version 2.8.4.
Title Soup Sieve: Memory Exhaustion via Large Comma-Separated Selector Lists in soupsieve
Weaknesses CWE-400
CWE-770
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 2:27 PM
Reserved
May 30, 2026, 4:17 AM
Status
Analyzed
Published
Jul 14, 2026, 9:17 PM
Modified
Oct 24, 2026, 9:10 PM
Severity
Important
Public date
Jul 14, 2026, 8:53 PM