{"id":"CVE-2026-126189","kind":"vulnerability","aliases":["CVE-2026-126189"],"related":[],"title":"Soup Sieve: quadratic :has() matching lets crafted HTML stall a worker","description":"Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 4.0.1, Soup Sieve repeatedly searches descendant subtrees for each candidate evaluated by :has() and repeatedly reevaluates a parent containing :has(> ...) for each child, causing quadratic matching on deeply nested or wide attacker-influenced HTML or XML. Applications using ordinary fixed selectors through select(), select_one(), or Beautiful Soup CSS APIs against untrusted documents can have a worker occupied for seconds or minutes, while applications that process only trusted documents are not affected. Selectors compiled with NOCACHE continue to use the old uncached behavior. This issue is fixed in version 4.0.1.","summary":"Soup Sieve is a CSS selector library used with Beautiful Soup 4. Before 4.0.1, evaluating :has() selectors against deeply nested or wide untrusted HTML or XML takes quadratic time, so an attacker can keep a worker busy for seconds or minutes.","severity":"medium","cvss":5.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["beautifulsoup","package","python","soupsieve","web-scraping"],"not_affected_if":["no-has-selectors","trusted-documents-only"],"how_to_check":"- Check the installed version with `pip show soupsieve`.\n- Search dependencies for `soupsieve` or `beautifulsoup4` to find where it is pulled in.\n- Look for code that calls select(), select_one() or CSS APIs with :has() on documents from users or other untrusted sources.","fix":"- soupsieve: `4.0.1`","status":"open","published_at":"2026-11-12T17:17:32+00:00","first_seen_at":"2026-11-12T17:39:37+00:00","triaged_at":"2026-11-12T17:40:12+00:00","updated_at":"2026-11-12T17:40:12+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-12T17:40:12Z","model":"claude-haiku-5-5","output":{"fix":"- soupsieve: `4.0.1`","reach":"internet","title":"Soup Sieve: quadratic :has() matching lets crafted HTML stall a worker","impact":"low","summary":"Soup Sieve is a CSS selector library used with Beautiful Soup 4. Before 4.0.1, evaluating :has() selectors against deeply nested or wide untrusted HTML or XML takes quadratic time, so an attacker can keep a worker busy for seconds or minutes.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","beautifulsoup","soupsieve","web-scraping"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Worker is occupied for seconds or minutes, causing denial of service","analyst_note":"Product ranges were not listed; the fixed version 4.0.1 comes from the description and should be confirmed against the registry data.,","how_to_check":"- Check the installed version with `pip show soupsieve`.\n- Search dependencies for `soupsieve` or `beautifulsoup4` to find where it is pulled in.\n- Look for code that calls select(), select_one() or CSS APIs with :has() on documents from users or other untrusted sources.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["trusted-documents-only","no-has-selectors"],"who_is_affected":"Applications that run Beautiful Soup CSS selectors, especially ones using :has(), against untrusted HTML or XML are exposed to slow matching and a stalled worker. Applications that only process trusted documents are not affected, and selectors compiled with NOCACHE keep the old uncached behavior.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"no","severity_if_unknown":"medium"},"cost_usd":0.000784,"input_tokens":4758,"output_tokens":617,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-126189':14A,17A '-2026':13A,16A '4':36B,80C '4.0.1':38B,83C,173C 'affect':155C 'api':133C 'applic':120C,147C 'attack':56B,115C 'attacker-influenc':114C 'beauti':34B,78C,130C 'beautifulsoup':18B 'behavior':166C 'busi':61B 'candid':92C 'caus':106C 'child':105C 'compil':157C 'contain':101C 'continu':160C 'craft':7A 'css':29B,70C,132C 'cve':12A,15A 'deepli':43B,110C 'descend':88C 'design':73C 'document':136C,152C 'evalu':39B,93C 'fix':123C,170C 'html':8A,48B,117C 'influenc':116C 'issu':168C 'keep':58B 'let':6A 'librari':31B,72C 'match':5A,108C 'minut':65B,145C 'nest':44B,111C 'nocach':159C 'occupi':141C 'old':164C 'one':128C 'ordinari':122C 'packag':19B 'parent':100C 'prior':81C 'process':149C 'python':20B 'quadrat':3A,52B,107C 'reevalu':98C 'repeat':86C,97C 'scrape':24B 'search':87C 'second':63B,143C 'select':126C,127C 'selector':30B,41B,71C,124C,156C 'siev':2A,26B,67C,85C 'soup':1A,25B,35B,66C,79C,84C,131C 'soupsiev':21B 'stall':9A 'subtre':89C 'take':51B 'time':53B 'trust':151C 'uncach':165C 'untrust':47B,135C 'use':32B,76C,121C,162C 'version':172C 'web':23B 'web-scrap':22B 'wide':46B,113C 'worker':11A,60B,140C 'xml':50B,119C","nicknames":[],"mitigations":[],"who_affected":"Applications that run Beautiful Soup CSS selectors, especially ones using :has(), against untrusted HTML or XML are exposed to slow matching and a stalled worker. Applications that only process trusted documents are not affected, and selectors compiled with NOCACHE keep the old uncached behavior.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["beautifulsoup","medium","package","python","soupsieve","webscraping"],"campaign_type":null,"search_a":"'-126189':14A,17A '-2026':13A,16A 'craft':7A 'cve':12A,15A 'html':8A 'let':6A 'match':5A 'quadrat':3A 'siev':2A 'soup':1A 'stall':9A 'worker':11A","search_b":"'4':36B '4.0.1':38B 'attack':56B 'beauti':34B 'beautifulsoup':18B 'busi':61B 'css':29B 'deepli':43B 'evalu':39B 'html':48B 'keep':58B 'librari':31B 'minut':65B 'nest':44B 'packag':19B 'python':20B 'quadrat':52B 'scrape':24B 'second':63B 'selector':30B,41B 'siev':26B 'soup':25B,35B 'soupsiev':21B 'take':51B 'time':53B 'untrust':47B 'use':32B 'web':23B 'web-scrap':22B 'wide':46B 'worker':60B 'xml':50B","search_c":"'4':80C '4.0.1':83C,173C 'affect':155C 'api':133C 'applic':120C,147C 'attack':115C 'attacker-influenc':114C 'beauti':78C,130C 'behavior':166C 'candid':92C 'caus':106C 'child':105C 'compil':157C 'contain':101C 'continu':160C 'css':70C,132C 'deepli':110C 'descend':88C 'design':73C 'document':136C,152C 'evalu':93C 'fix':123C,170C 'html':117C 'influenc':116C 'issu':168C 'librari':72C 'match':108C 'minut':145C 'nest':111C 'nocach':159C 'occupi':141C 'old':164C 'one':128C 'ordinari':122C 'parent':100C 'prior':81C 'process':149C 'quadrat':107C 'reevalu':98C 'repeat':86C,97C 'search':87C 'second':143C 'select':126C,127C 'selector':71C,124C,156C 'siev':67C,85C 'soup':66C,79C,84C,131C 'subtre':89C 'trust':151C 'uncach':165C 'untrust':135C 'use':76C,121C,162C 'version':172C 'wide':113C 'worker':140C 'xml':119C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-04T16:39:03+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-126189","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126189","severity":null,"published_at":"2026-11-12T17:17:32+00:00","modified_at":"2026-11-12T17:17:32+00:00","first_seen_at":"2026-11-12T17:39:37+00:00","fetched_at":"2026-11-12T17:39:37+00:00","note":null}],"documents":[{"id":136835,"url":"https://github.com/facelessuser/soupsieve/commit/0469c148f5501ec2127e0d65b77c2a1c395fa379","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":136836,"url":"https://github.com/facelessuser/soupsieve/commit/305fbf6b8c1f6ff05fec55d1e5bb28d80d22de44","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":136837,"url":"https://github.com/facelessuser/soupsieve/releases/tag/4.0.1","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"},{"id":136838,"url":"https://github.com/facelessuser/soupsieve/security/advisories/GHSA-8jvp-3x96-xpqw","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-04T16:39:03+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}