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.
Published: 2026-07-14
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Mon, 27 Jul 2026 13:15:00 +0000

Type Values Removed Values Added
First Time appeared Facelessuser
Facelessuser soupsieve
Vendors & Products Facelessuser
Facelessuser soupsieve

Wed, 15 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Wed, 15 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Tue, 14 Jul 2026 21:15:00 +0000

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'}


Subscriptions

Facelessuser Soupsieve
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T14:27:06.146Z

Reserved: 2026-05-30T04:17:43.095Z

Link: CVE-2026-49476

cve-icon Vulnrichment

Updated: 2026-07-15T14:26:41.737Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-14T20:53:12Z

Links: CVE-2026-49476 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T05:00:05Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-770

    Allocation of Resources Without Limits or Throttling