{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/vendors/beautiful-soup-project/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["soupsieve \u003c= 2.8.3","beautifulsoup4"],"_cs_severities":["medium"],"_cs_tags":["denial-of-service","memory-exhaustion","python","supply-chain"],"_cs_type":"advisory","_cs_vendors":["Soupsieve Project","Beautiful Soup Project"],"content_html":"\u003cp\u003eA critical memory exhaustion vulnerability, tracked as CVE-2026-49476, has been identified in soupsieve versions up to and including 2.8.3. Soupsieve is a CSS selector engine widely used by \u003ccode\u003ebeautifulsoup4\u003c/code\u003e, a popular Python library for parsing HTML and XML documents. This vulnerability allows an unauthenticated attacker to trigger a denial of service (DoS) by providing a specially crafted, large comma-separated CSS selector string to applications that process user-supplied selectors through \u003ccode\u003esoupsieve.compile()\u003c/code\u003e or Beautiful Soup's \u003ccode\u003e.select()\u003c/code\u003e/\u003ccode\u003e.select_one()\u003c/code\u003e. A relatively small input of 500 KB can lead to approximately 244 MB of heap memory allocation, representing a 488x amplification ratio. This can result in out-of-memory (OOM) kills in containerized environments, severe performance degradation due to swap thrashing on bare-metal systems, or Python \u003ccode\u003eMemoryError\u003c/code\u003e exceptions, affecting any server-side Python application accepting external CSS selectors.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAn attacker crafts a large CSS selector string containing numerous comma-separated items, such as \u0026quot;a,a,a,...\u0026quot; with hundreds of thousands of repetitions.\u003c/li\u003e\n\u003cli\u003eThe attacker delivers this crafted selector string to a vulnerable Python application that incorporates \u003ccode\u003esoupsieve\u003c/code\u003e or \u003ccode\u003ebeautifulsoup4\u003c/code\u003e and processes user-supplied CSS selectors.\u003c/li\u003e\n\u003cli\u003eThe application passes the malicious string to \u003ccode\u003esoupsieve.compile()\u003c/code\u003e or to Beautiful Soup's \u003ccode\u003e.select()\u003c/code\u003e or \u003ccode\u003e.select_one()\u003c/code\u003e methods.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003esoupsieve\u003c/code\u003e parser tokenizes the entire string and identifies each comma-delimited segment of the selector list.\u003c/li\u003e\n\u003cli\u003eFor each segment, \u003ccode\u003esoupsieve\u003c/code\u003e attempts to parse it into a \u003ccode\u003eSelector\u003c/code\u003e object, including associated tag, attribute, and pseudo-class metadata.\u003c/li\u003e\n\u003cli\u003eAll parsed \u003ccode\u003eSelector\u003c/code\u003e objects are stored in a \u003ccode\u003eSelectorList\u003c/code\u003e structure.\u003c/li\u003e\n\u003cli\u003eDue to the unbounded parsing, each \u003ccode\u003eSelector\u003c/code\u003e object consumes approximately 976 bytes of heap memory, leading to a linear increase in memory consumption for each item in the comma-separated list.\u003c/li\u003e\n\u003cli\u003eThis massive, unintended memory allocation exhausts available system resources, resulting in a denial of service for the target application.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eThis vulnerability poses a high risk of denial of service (DoS) for any server-side Python application that processes user-supplied CSS selectors using \u003ccode\u003esoupsieve\u003c/code\u003e (versions \u0026lt;= 2.8.3) or \u003ccode\u003ebeautifulsoup4\u003c/code\u003e. Successful exploitation can cause severe operational disruptions, including OOM kills in containerized deployments (such as Kubernetes or Docker containers), leading to application crashes and unavailability. On bare-metal servers, the intense memory demands can trigger swap thrashing, significantly degrading overall system performance for all co-located processes. In other cases, Python's \u003ccode\u003eMemoryError\u003c/code\u003e exception will terminate the affected process. The attack's scalability is linear, meaning an attacker can precisely tune the input payload to exhaust a target's specific memory limits, and concurrent requests can multiply the effect.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003ePatch \u003ccode\u003esoupsieve\u003c/code\u003e\u003c/strong\u003e: Immediately upgrade \u003ccode\u003esoupsieve\u003c/code\u003e to a patched version greater than 2.8.3 to remediate CVE-2026-49476.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eUpgrade \u003ccode\u003ebeautifulsoup4\u003c/code\u003e\u003c/strong\u003e: Ensure \u003ccode\u003ebeautifulsoup4\u003c/code\u003e is updated to a version that bundles a patched \u003ccode\u003esoupsieve\u003c/code\u003e dependency, or explicitly update \u003ccode\u003esoupsieve\u003c/code\u003e in your project's dependency lock file.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eInput validation\u003c/strong\u003e: Implement strict input validation and sanitization for any user-supplied CSS selectors, limiting their complexity and length before processing them with \u003ccode\u003esoupsieve.compile()\u003c/code\u003e or Beautiful Soup's \u003ccode\u003e.select()\u003c/code\u003e/\u003ccode\u003e.select_one()\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eResource Monitoring\u003c/strong\u003e: Deploy robust memory and CPU utilization monitoring for Python applications that process untrusted input, using tools like \u003ccode\u003etracemalloc\u003c/code\u003e for deep memory profiling if custom application logging is enabled.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-07-09T13:38:51Z","date_published":"2026-07-09T13:38:51Z","id":"https://feed.craftedsignal.io/briefs/2026-07-soup-sieve-memory-exhaustion/","summary":"A memory exhaustion vulnerability (CVE-2026-49476) in the soupsieve CSS selector parser, an indirect dependency of Beautiful Soup 4, allows an unauthenticated attacker to cause a denial of service by supplying a crafted, large comma-separated CSS selector string to applications using `soupsieve.compile()` or Beautiful Soup's `.select()`/`.select_one()`, leading to unbounded memory allocation and system resource exhaustion.","title":"Soup Sieve Memory Exhaustion via Large Comma-Separated Selector Lists (CVE-2026-49476)","url":"https://feed.craftedsignal.io/briefs/2026-07-soup-sieve-memory-exhaustion/"}],"language":"en","title":"CraftedSignal Threat Feed - Beautiful Soup Project","version":"https://jsonfeed.org/version/1.1"}