Soup Sieve before 4.0.0: a small nested page can freeze Beautiful Soup selectors, update now
Python developers who run CSS selectors through Beautiful Soup on HTML or XML that strangers can influence, such as scrapers, sanitizers and upload handlers.
How to fix it
You haveUpdate to
< 4.0.0→4.0.0
Check your version
Which version you havepip show soupsieve
Update
pippip install --upgrade "soupsieve>=4.0.0"
uv add "soupsieve>=4.0.0"
Soup Sieve is what runs select() and select_one() in Beautiful Soup, so it's often installed as a dependency you never chose. A tiny, deeply nested page can tie up a worker for close to a minute against an ordinary selector like section div div. Pages you trust aren't a risk.