Soup Sieve before 3.0.2: a short crafted CSS selector can hang Beautiful Soup, update now
Python developers whose apps let users type their own CSS selectors, such as scraping services, query builders and custom extraction rules.
How to fix it
You haveUpdate to
< 3.0.2→3.0.2
Check your version
Which version you havepip show soupsieve
Update
pippip install --upgrade "soupsieve>=3.0.2"
uv add "soupsieve>=3.0.2"
The attacker has to supply the selector itself. A string of about 60 bytes stalls the worker while Soup Sieve compiles it. Version 3.0.0 had the fix but was pulled from PyPI. If you already moved to 4.0.0 for the descendant-combinator flaw, you're covered.