Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

GHSA-2wc2-fm75-p42x: Soup Sieve has Memory Exhaustion via Large Comma-Separated Selector Lists

0
High
Published: 07/09/2026 (07/09/2026, 13:37:40 UTC)
Source: GCVE Database
Product: soupsieve

Description

A vulnerability in soupsieve's CSS selector parser allows unbounded memory allocation when processing large comma-separated selector lists. An attacker can supply a crafted CSS selector string to soupsieve.compile() or Beautiful Soup's .select()/.select_one() methods, causing excessive heap memory use and potential denial of service. The issue arises because no limit is enforced on the number of selectors parsed, leading to linear scaling of memory usage with a high amplification ratio. This can cause out-of-memory conditions, process termination, or degraded server performance. The vulnerability affects soupsieve versions prior to 2.8.4.

CVSS v3.1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

PyPIghsa
soupsieve
Affected versions
<2.8.4

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/09/2026, 14:02:45 UTC

Technical Analysis

The soupsieve CSS parser allocates approximately 976 bytes of heap memory per selector when compiling comma-separated selector lists. It does not limit the number of selectors, so a large input string with many selectors (e.g., 250,000 'a' selectors separated by commas) causes the parser to allocate hundreds of megabytes of memory from a relatively small input (~500 KB). This unbounded memory allocation can lead to memory exhaustion and denial of service in applications using soupsieve.compile() or Beautiful Soup's .select() and .select_one() methods with user-supplied selectors. The attack surface includes any server-side Python application that accepts user input for CSS selectors. The amplification ratio of memory allocated to input size is approximately 488x. The vulnerability is tracked as CVE-2026-49476 and affects soupsieve versions before 2.8.4.

Potential Impact

An attacker can cause denial of service by exhausting available memory on servers running vulnerable soupsieve versions. This can lead to container OOM kills, swap thrashing on physical servers, or Python process termination via MemoryError exceptions. The attack requires no authentication or user interaction and can be tuned to exhaust specific memory limits. Multiple concurrent exploit attempts can amplify the impact. This affects any application that compiles user-supplied CSS selectors using soupsieve or Beautiful Soup's selector methods.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, avoid passing untrusted or user-supplied CSS selectors to soupsieve.compile() or Beautiful Soup's .select()/.select_one() methods. Implement input validation or limits on selector list size to mitigate memory exhaustion risks.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-2wc2-fm75-p42x
Osv Schema Version
1.4.0
Aliases
["CVE-2026-49476"]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a4fa9a168715ace437d3dd0

Added to database: 07/09/2026, 14:01:05 UTC

Last enriched: 07/09/2026, 14:02:45 UTC

Last updated: 07/09/2026, 17:36:06 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses