{"id":"CVE-2026-126192","kind":"vulnerability","aliases":["CVE-2026-126192"],"related":[],"title":"Soup Sieve: crafted selector with :has() can stall CSS matching","description":"Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 2.10, matching a developer-authored selector that places the general sibling combinator inside :has() repeatedly scans each candidate element's following siblings when the right-hand side is absent, producing quadratic work on attacker-controlled HTML. Applications that evaluate a fixed selector such as div:has(a ~ b) over untrusted markup can have a worker occupied for minutes by a small document, while the adjacent sibling form and trusted-only document processing are not affected in the same way. This issue is fixed in version 2.10.","summary":"Soup Sieve, a CSS selector library used with Beautiful Soup 4, does quadratic work when a developer-written selector places the general sibling combinator inside :has(). An attacker supplying HTML can tie up a worker for minutes with a small document.","severity":"medium","cvss":6.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["beautifulsoup","package","python","soupsieve"],"not_affected_if":["adjacent-sibling-only","no-has-selector","trusted-input-only"],"how_to_check":"- Look for `soupsieve` in the lockfile or installed packages, for example `pip show soupsieve`.\n- Check whether the application evaluates selectors such as `div:has(a ~ b)` against untrusted markup.","fix":"- Soup Sieve `2.10` (fixed version named in the description).","status":"open","published_at":"2026-11-12T17:17:32+00:00","first_seen_at":"2026-11-12T17:39:38+00:00","triaged_at":"2026-11-12T17:40:01+00:00","updated_at":"2026-11-12T17:40:01+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-12T17:40:01Z","model":"claude-haiku-5-5","output":{"fix":"- Soup Sieve `2.10` (fixed version named in the description).","reach":"internet","title":"Soup Sieve: crafted selector with :has() can stall CSS matching","impact":"low","summary":"Soup Sieve, a CSS selector library used with Beautiful Soup 4, does quadratic work when a developer-written selector places the general sibling combinator inside :has(). An attacker supplying HTML can tie up a worker for minutes with a small document.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","beautifulsoup","soupsieve"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"Worker process stalls for minutes on a small crafted document","analyst_note":"","how_to_check":"- Look for `soupsieve` in the lockfile or installed packages, for example `pip show soupsieve`.\n- Check whether the application evaluates selectors such as `div:has(a ~ b)` against untrusted markup.","plain_action":"","product_name":"soupsieve","needs_analyst":false,"not_affected_if":["trusted-input-only","no-has-selector","adjacent-sibling-only"],"who_is_affected":"Applications that run a fixed selector containing `:has()` with the general sibling combinator (`~`) over HTML from untrusted sources can have a worker occupied for minutes by a small document. Trusted-only document processing and the adjacent sibling form (`+`) are described as not affected in the same way. unknown whether other selector shapes are affected.","user_interaction":"no","product_ecosystem":"pypi","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000758,"input_tokens":4694,"output_tokens":577,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-126192':13A,16A '-2026':12A,15A '2.10':80C,169C '4':31B,77C 'absent':110C 'adjac':147C 'affect':158C 'applic':119C 'attack':49B,116C 'attacker-control':115C 'author':85C 'b':130C 'beauti':29B,75C 'beautifulsoup':17B 'candid':98C 'combin':45B,92C 'control':117C 'craft':3A 'css':9A,24B,67C 'cve':11A,14A 'design':70C 'develop':38B,84C 'developer-author':83C 'developer-written':37B 'div':127C 'document':62B,144C,154C 'element':99C 'evalu':121C 'fix':123C,166C 'follow':101C 'form':149C 'general':43B,90C 'hand':107C 'html':51B,118C 'insid':46B,93C 'issu':164C 'librari':26B,69C 'markup':133C 'match':10A,81C 'minut':58B,140C 'occupi':138C 'packag':18B 'place':41B,88C 'prior':78C 'process':155C 'produc':111C 'python':19B 'quadrat':33B,112C 'repeat':95C 'right':106C 'right-hand':105C 'scan':96C 'selector':4A,25B,40B,68C,86C,124C 'sibl':44B,91C,102C,148C 'side':108C 'siev':2A,22B,64C 'small':61B,143C 'soup':1A,21B,30B,63C,76C 'soupsiev':20B 'stall':8A 'suppli':50B 'tie':53B 'trust':152C 'trusted-on':151C 'untrust':132C 'use':27B,73C 'version':168C 'way':162C 'work':34B,113C 'worker':56B,137C 'written':39B","nicknames":[],"mitigations":[],"who_affected":"Applications that run a fixed selector containing `:has()` with the general sibling combinator (`~`) over HTML from untrusted sources can have a worker occupied for minutes by a small document. Trusted-only document processing and the adjacent sibling form (`+`) are described as not affected in the same way. unknown whether other selector shapes are affected.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["beautifulsoup","medium","package","python","soupsieve"],"campaign_type":null,"search_a":"'-126192':13A,16A '-2026':12A,15A 'craft':3A 'css':9A 'cve':11A,14A 'match':10A 'selector':4A 'siev':2A 'soup':1A 'stall':8A","search_b":"'4':31B 'attack':49B 'beauti':29B 'beautifulsoup':17B 'combin':45B 'css':24B 'develop':38B 'developer-written':37B 'document':62B 'general':43B 'html':51B 'insid':46B 'librari':26B 'minut':58B 'packag':18B 'place':41B 'python':19B 'quadrat':33B 'selector':25B,40B 'sibl':44B 'siev':22B 'small':61B 'soup':21B,30B 'soupsiev':20B 'suppli':50B 'tie':53B 'use':27B 'work':34B 'worker':56B 'written':39B","search_c":"'2.10':80C,169C '4':77C 'absent':110C 'adjac':147C 'affect':158C 'applic':119C 'attack':116C 'attacker-control':115C 'author':85C 'b':130C 'beauti':75C 'candid':98C 'combin':92C 'control':117C 'css':67C 'design':70C 'develop':84C 'developer-author':83C 'div':127C 'document':144C,154C 'element':99C 'evalu':121C 'fix':123C,166C 'follow':101C 'form':149C 'general':90C 'hand':107C 'html':118C 'insid':93C 'issu':164C 'librari':69C 'markup':133C 'match':81C 'minut':140C 'occupi':138C 'place':88C 'prior':78C 'process':155C 'produc':111C 'quadrat':112C 'repeat':95C 'right':106C 'right-hand':105C 'scan':96C 'selector':68C,86C,124C 'sibl':91C,102C,148C 'side':108C 'siev':64C 'small':143C 'soup':63C,76C 'trust':152C 'trusted-on':151C 'untrust':132C 'use':73C 'version':168C 'way':162C 'work':113C 'worker':137C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-04T13:56:29+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-126192","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126192","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:38+00:00","fetched_at":"2026-11-12T17:39:38+00:00","note":null}],"documents":[{"id":136845,"url":"https://github.com/facelessuser/soupsieve/commit/ffb88cca745c591224f74a8e86414a85e8f35fc0","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":136846,"url":"https://github.com/facelessuser/soupsieve/releases/tag/2.10","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":136847,"url":"https://github.com/facelessuser/soupsieve/security/advisories/GHSA-4j63-6c4x-wfg4","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-04T13:56:29+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"}