CVE-2026-126189
published medium CVSS 3.1 · 5.3Soup Sieve: Quadratic-time denial of service when matching `:has()`
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| facelessuser | — | soupsieve< 4.0.1 | Affected | Not stated | 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| facelessuser | soupsieve | < 4.0.1 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-407 CWE-407: Inefficient Algorithmic Complexity
References
5- https://github.com/facelessuser/soupsieve/commit/0469c148f5501ec2127e0d65b77c2a1c395fa379
- https://github.com/facelessuser/soupsieve/commit/305fbf6b8c1f6ff05fec55d1e5bb28d80d22de44
- https://github.com/facelessuser/soupsieve/pull/352
- https://github.com/facelessuser/soupsieve/releases/tag/4.0.1
- https://github.com/facelessuser/soupsieve/security/advisories/GHSA-8jvp-3x96-xpqw
Provider assertions
2GitHub_M · cna
Soup Sieve: Quadratic-time denial of service when matching `:has()`
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2905739aa1c3de2ae24098db765e555c9b6f60e69dff0d95c18ad9fde9337a0b
- Ingested
- 16 Nov 2026, 19:15:09 UTC
- Source record
- Official CVE record