cve.bz

CVE-2026-126189 Soup Sieve: Quadratic-time denial of service when matching `:has()`

5.3 mediumEPSS 0.3%

Medium (5.3) in facelessuser soupsieve. EPSS 0.3% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

5.3 medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS
0.3% estimated probability of exploitation activity in the next 30 days; 23rd percentile. Scored 2026-11-13. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-407 Inefficient Algorithmic Complexity
Published
Modified
Assigned by
GitHub_M (CNA)
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Ask an AI about this CVE

Show the promptExplain CVE-2026-126189 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-126189?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-126189?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-126189 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2026-126189

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2026-126189](https://cve.bz/cve/badge/CVE-2026-126189.svg)](https://cve.bz/cve/CVE-2026-126189)

HTML:

<a href="https://cve.bz/cve/CVE-2026-126189"><img src="https://cve.bz/cve/badge/CVE-2026-126189.svg" alt="CVE-2026-126189"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
facelessuser soupsieve< 4.0.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu20.04:LTS, 22.04:LTS, 24.04:LTS and 2 moresoupsieveno fix listedUBUNTU-CVE-2026-126189

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu.

References

Check your stackJSON