{"id":"CVE-2026-126191","kind":"vulnerability","aliases":["CVE-2026-126191"],"related":[],"title":"Soup Sieve: crafted CSS selector stalls Python workers via regex backtracking","description":"Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 3.0, the CSS_ESCAPES and IDENTIFIER regular-expression subpatterns can backtrack exponentially on runs of ambiguous digit escapes in an attribute-name or tag position of an otherwise valid selector. The failure occurs during selector compilation through soupsieve.compile() or Beautiful Soup select() before SELECTOR_LIMIT is applied, so an application that accepts untrusted selector strings can have a worker stalled by a short input. This issue is fixed in version 3.0.","summary":"Soup Sieve, a CSS selector library used with Beautiful Soup 4, has regular expressions that backtrack exponentially on certain digit escapes in selectors. A short selector string can stall the process compiling it, causing a denial of service.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["beautifulsoup","package","python","soupsieve"],"not_affected_if":["trusted-selectors-only"],"how_to_check":"- Check the installed version with `pip show soupsieve`; versions below `3.0` are affected.\n- Look for code that passes untrusted input to `soupsieve.compile()` or Beautiful Soup `select()`.","fix":"- Upgrade soupsieve to `3.0`.","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:39:52+00:00","updated_at":"2026-11-12T17:39:52+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-12T17:39:52Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade soupsieve to `3.0`.","reach":"internet","title":"Soup Sieve: crafted CSS selector stalls Python workers via regex backtracking","impact":"low","summary":"Soup Sieve, a CSS selector library used with Beautiful Soup 4, has regular expressions that backtrack exponentially on certain digit escapes in selectors. A short selector string can stall the process compiling it, causing a denial of service.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","beautifulsoup","soupsieve"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"A short selector input stalls a worker, causing denial of service","analyst_note":"","how_to_check":"- Check the installed version with `pip show soupsieve`; versions below `3.0` are affected.\n- Look for code that passes untrusted input to `soupsieve.compile()` or Beautiful Soup `select()`.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["trusted-selectors-only"],"who_is_affected":"Applications that accept selector strings from untrusted users and compile them with Soup Sieve or Beautiful Soup's select(). Applications that only use selectors written by their own developers are much less exposed. unknown for exact affected ranges beyond 'prior to 3.0'.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000731,"input_tokens":4696,"output_tokens":523,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-126191':14A,17A '-2026':13A,16A '3.0':77C,149C '4':32B,74C 'accept':130C 'ambigu':93C 'appli':125C 'applic':128C 'attribut':99C 'attribute-nam':98C 'backtrack':11A,37B,88C 'beauti':30B,72C,118C 'beautifulsoup':18B 'caus':55B 'certain':40B 'compil':53B,114C 'craft':3A 'css':4A,25B,64C,79C 'cve':12A,15A 'denial':57B 'design':67C 'digit':41B,94C 'escap':42B,80C,95C 'exponenti':38B,89C 'express':35B,85C 'failur':110C 'fix':146C 'identifi':82C 'input':142C 'issu':144C 'librari':27B,66C 'limit':123C 'name':100C 'occur':111C 'otherwis':106C 'packag':19B 'posit':103C 'prior':75C 'process':52B 'python':7A,20B 'regex':10A 'regular':34B,84C 'regular-express':83C 'run':91C 'select':120C 'selector':5A,26B,44B,47B,65C,108C,113C,122C,132C 'servic':59B 'short':46B,141C 'siev':2A,23B,61C 'soup':1A,22B,31B,60C,73C,119C 'soupsiev':21B 'soupsieve.compile':116C 'stall':6A,50B,138C 'string':48B,133C 'subpattern':86C 'tag':102C 'untrust':131C 'use':28B,70C 'valid':107C 'version':148C 'via':9A 'worker':8A,137C","nicknames":[],"mitigations":[],"who_affected":"Applications that accept selector strings from untrusted users and compile them with Soup Sieve or Beautiful Soup's select(). Applications that only use selectors written by their own developers are much less exposed. unknown for exact affected ranges beyond 'prior to 3.0'.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["beautifulsoup","high","package","python","soupsieve"],"campaign_type":null,"search_a":"'-126191':14A,17A '-2026':13A,16A 'backtrack':11A 'craft':3A 'css':4A 'cve':12A,15A 'python':7A 'regex':10A 'selector':5A 'siev':2A 'soup':1A 'stall':6A 'via':9A 'worker':8A","search_b":"'4':32B 'backtrack':37B 'beauti':30B 'beautifulsoup':18B 'caus':55B 'certain':40B 'compil':53B 'css':25B 'denial':57B 'digit':41B 'escap':42B 'exponenti':38B 'express':35B 'librari':27B 'packag':19B 'process':52B 'python':20B 'regular':34B 'selector':26B,44B,47B 'servic':59B 'short':46B 'siev':23B 'soup':22B,31B 'soupsiev':21B 'stall':50B 'string':48B 'use':28B","search_c":"'3.0':77C,149C '4':74C 'accept':130C 'ambigu':93C 'appli':125C 'applic':128C 'attribut':99C 'attribute-nam':98C 'backtrack':88C 'beauti':72C,118C 'compil':114C 'css':64C,79C 'design':67C 'digit':94C 'escap':80C,95C 'exponenti':89C 'express':85C 'failur':110C 'fix':146C 'identifi':82C 'input':142C 'issu':144C 'librari':66C 'limit':123C 'name':100C 'occur':111C 'otherwis':106C 'posit':103C 'prior':75C 'regular':84C 'regular-express':83C 'run':91C 'select':120C 'selector':65C,108C,113C,122C,132C 'short':141C 'siev':61C 'soup':60C,73C,119C 'soupsieve.compile':116C 'stall':138C 'string':133C 'subpattern':86C 'tag':102C 'untrust':131C 'use':70C 'valid':107C 'version':148C 'worker':137C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-04T13:57:14+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-126191","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126191","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":136842,"url":"https://github.com/facelessuser/soupsieve/commit/dbfa2854ff31a863326bd6660d4e55c6f068db9e","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":136843,"url":"https://github.com/facelessuser/soupsieve/releases/tag/3.0","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":136844,"url":"https://github.com/facelessuser/soupsieve/security/advisories/GHSA-6655-6qjp-jx7x","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-11-04T13:57:14+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"}