CVE-2026-126189
JSON

5.3medium

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

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.45% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
facelessuser soupsieve< 4.0.1CVE List

Classification

CWE-407

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-126189 changed 2026-11-16CVE Terms of Use
NVDCVE-2026-126189 changed 2026-11-16Public domain