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

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-12 · Modified: 2026-11-16
- Aliases: UBUNTU-CVE-2026-126189, DEBIAN-CVE-2026-126189
- Record: https://cvemate.com/vulnerability/CVE-2026-126189 · JSON: https://cvemate.com/vulnerability/CVE-2026-126189/json

## Description

```text
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.
```

## Signals

- CVSS: 5.3 medium (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- EPSS: 0.454%, percentile 41.105%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian soupsieve (Debian): All versions (No fix recorded) \| \< 4.1-1
- ubuntu soupsieve (Ubuntu): All versions (No fix recorded)
- facelessuser soupsieve: \< 4.0.1

## References

- <https://github.com/facelessuser/soupsieve/security/advisories/GHSA-8jvp-3x96-xpqw>
- <https://github.com/facelessuser/soupsieve/pull/352>
- <https://github.com/facelessuser/soupsieve/commit/0469c148f5501ec2127e0d65b77c2a1c395fa379>
- <https://github.com/facelessuser/soupsieve/commit/305fbf6b8c1f6ff05fec55d1e5bb28d80d22de44>
- <https://github.com/facelessuser/soupsieve/releases/tag/4.0.1>
- <https://ubuntu.com/security/CVE-2026-126189>
- <https://www.cve.org/CVERecord?id=CVE-2026-126189>
- <https://security-tracker.debian.org/tracker/CVE-2026-126189>

---

Data as of 2026-12-05T04:02:28.116Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
