CVE-2026-126193
Soup Sieve: Uncontrolled recursion in Soup Sieve CSS parser lets nested pseudo-class selectors exhaust the Python call stack
Impact
Soup Sieve is a CSS selector library for Beautiful Soup. From 0.4 until 3.0, deeply nested CSS pseudo-class selectors can cause recursive parsing to exceed Python’s recursion limit and raise RecursionError . Applications accepting untrusted selectors may experience failure of the affected request or task if the exception is not handled. The demonstrated behavior is recoverable and does not establish an interpreter crash or persistent service-wide denial of service. This vulnerability is fixed in version 3.0.
An attacker can exploit this over the network, without logging in, without any action by a user. If it succeeds: low risk of outages.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| pip | soupsieve | >= 0.4, <= 2.10 | 3.0.2 |
Affected products · Facelessuser
| Product | Affected versions |
|---|---|
| Soupsieve | from 0.4, before 3.0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/facelessuser/soupsieve/security/advisories/GHSA-7g44-g9rc-x53w
- https://github.com/facelessuser/soupsieve/pull/306
- https://github.com/facelessuser/soupsieve/commit/52de12f157a373614ad0f486d434551c5a4378ee
- https://github.com/facelessuser/soupsieve/releases/tag/3.0
- https://github.com/advisories/GHSA-7g44-g9rc-x53w
- https://nvd.nist.gov/vuln/detail/CVE-2026-126193