The vulnerability CVE-2026-86000 in soupsieve is a Regular Expression Denial of Service (ReDoS) caused by an inefficiently constructed regular expression, specifically the IDENTIFIER sub-pattern, located in soupsieve/css_parser.py. This regex contains adjacent quantified groups over overlapping character classes, leading to catastrophic backtracking and quadratic time complexity when processing certain malformed or long selector strings.
The attack chain begins when a user-controlled CSS selector string is passed to soupsieve.compile() (or other public API functions like select, iselect, etc.). This function then calls soupsieve.css_parser._cached_css_compile, which in turn initializes a CSSParser object and invokes its process_selectors method. The process_selectors method, through a series of parsing steps, eventually leads to SelectorPattern.match being called. It is within SelectorPattern.match that the vulnerable IDENTIFIER regex is executed against the input, triggering the ReDoS condition.
The provided patch directly addresses this by modifying the IDENTIFIER regex in soupsieve/css_parser.py to remove the problematic adjacent quantifiers, thus preventing the quadratic backtracking. The identified functions represent the critical path from user input to the execution of the vulnerable regex, and would appear in a runtime profiler during an exploitation attempt.