Intel

AIKIDO-2026-623572

soupsieve is vulnerable to Regular Expression Denial of Service (ReDoS)

Regular Expression Denial of Service (ReDoS)CVE-2026-85999 Published 5 days ago

53

Medium Risk

This Affects:

PYTHONsoupsieve
1.0.0 - 2.8.4
Fixed in 2.9.0
Are you affected? Scan for Free

TL;DR

The soupsieve CSS selector parser trims trailing whitespace and comments with the RE_WS_END regex. That pattern has no start anchor and is applied with search(), so the engine retries at every offset. A selector with a long run of whitespace or repeated comments before a token then takes quadratic time, so a roughly 20 KB selector consumes about ten seconds of CPU. The fix rewrites trailing trimming as a start anchored match over the reversed string so trimming stays linear.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application compiles user controlled CSS selectors.

Background info

soupsieve is vulnerable to Regular Expression Denial of Service (ReDoS) in versions 1.0.0 - 2.8.4.

How to fix this

Upgrade the soupsieve library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform