Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Uncontrolled Recursion vulnerabilities in an interactive lesson.
Start learningUpgrade soupsieve to version 3.0 or higher.
Affected versions of this package are vulnerable to Uncontrolled Recursion via parse_pseudo_open in soupsieve/css_parser.py, which calls back into parse_selectors for each level of nested pseudo-class selector (:is(), :not(), :where(), :has()) without any recursion depth limit. An attacker who can supply a CSS selector string to soupsieve.compile(), soupsieve.select(), or Beautiful Soup's soup.select() / soup.select_one() can exhaust the Python call stack with roughly 330 levels of nesting (about 1.6 KB of input), raising an uncontrolled RecursionError. The existing SELECTOR_LIMIT token guard reaches only about 330 at the failing depth versus its ceiling of 8192, so it never fires. Because RecursionError is outside the parser's documented error contract of ValueError / SelectorSyntaxError, applications that catch only those exceptions experience an unexpected per-request failure.
Note: This is only exploitable when the application passes attacker-controlled CSS selector strings to the parser.
Requires only an installed Soup Sieve (any release from 0.4 through 2.10) and a default CPython recursion limit of 1000. No Beautiful Soup document or network setup is needed.
import soupsieve as sv~330 levels of nested :is() around a single tag: about 1.6 KB of input.
depth = 330 selector = ":is(" * depth + "a" + ")" * depth print("selector length:", len(selector)) sv.compile(selector)
selector length: 1651
Traceback (most recent call last):
...
File ".../soupsieve/css_parser.py", line 985, in parse_pseudo_open
sel.selectors.append(self.parse_selectors(iselector, index, flags))
RecursionError: maximum recursion depth exceeded
The same failure was reproduced with :not(), :where(), and :has(), and through BeautifulSoup(...).select(selector). A negative control at depth 100 compiles successfully with a token count of 101, confirming the token guard is far from firing.
Note: Requires only an installed Soup Sieve and a default CPython recursion limit of 1000, with no Beautiful Soup document or network setup needed.