CVE-2026-126189 Soup Sieve: Quadratic-time denial of service when matching `:has()`
Attacker-influenced HTML or XML can trigger quadratic matching in :has() selectors, exhausting workers in apps using Soup Sieve on untrusted documents.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Harmful if only installed
- No
- Needs a specific call
- Yes
- Fix
- None listed
What is CVE-2026-126189?
CVE-2026-126189 is a medium-severity denial of service vulnerability in facelessuser soupsieve, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 4.0.1, Soup Sieve repeatedly searches descendant subtrees for each candidate evaluated by :has() and repeatedly reevaluates a parent containing :has(> ...) for each child, causing quadratic matching on deeply nested or wide attacker-influenced HTML or XML. Applications using ordinary fixed selectors through select(), select_one(), or Beautiful Soup CSS APIs against untrusted documents can have a worker occupied for seconds or minutes, while applications that process only trusted documents are not affected. Selectors compiled with NOCACHE continue to use the old uncached behavior. This issue is fixed in version 4.0.1.
Weakness: CWE-407
Which versions are affected by CVE-2026-126189?
An affected version is only exploitable if your software calls :has(), select() or select_one(). Many projects that include it are not exposed.
How do I fix CVE-2026-126189?
No fix has been published for CVE-2026-126189 yet. Limit exposure of the affected software until one is available.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2026-126189 being exploited?
There is no known exploitation of CVE-2026-126189 in the wild and no public exploit code.
Sources
Also known as GHSA-8jvp-3x96-xpqw.