CVE-2026-126191: Soup Sieve: Exponential ReDoS in selector compilation via \9-run in CSS_ESCAPES/IDENTIFIER
Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-6655-6qjp-jx7x
Summary
Soup Sieve is vulnerable to an exponential Regular Expression Denial of Service (ReDoS) flaw triggered by specifically crafted CSS escape sequences during selector compilation. Engineering teams utilizing libraries that compile untrusted CSS selector strings must update their dependencies immediately.
Who is affected
The vulnerability affects applications that process user-supplied CSS selectors, such as web scraping services, no-code platforms, or custom query builders. An attacker can supply a small input string, approximately 60 bytes in length, to cause significant resource exhaustion and hang the processing worker during the compilation phase.
Exploitability
The vulnerability is rated as High severity (CVSS 7.5) due to its potential to cause a full denial of service via network access without requiring authentication. With an EPSS score of 0.004, the likelihood of exploitation is low, and the vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade the soupsieve package to version 3.0.2 or later.
- Avoid passing untrusted user input directly into soupsieve.compile() or BeautifulSoup .select() methods.
How to check your project
- Inspect requirements.txt or pyproject.toml to determine if soupsieve is in use.
- Use 'pip show soupsieve' in your environment to verify the currently installed version number.
- Verify if version 3.0.0 or 3.0.1 is installed, as these versions should be avoided due to registry yanking.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | soupsieve |
>= 0, < 3.0.2 | 3.0.2 | python -m pip install 'soupsieve>=3.0.2' |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | High |
FAQ
Is this the same vulnerability as previous Soup Sieve ReDoS reports?
No, this is a distinct vector targeting the IDENTIFIER/CSS_ESCAPES regex, which is separate from the previously patched vulnerabilities involving the VALUE regex and comma-list parsing.
Why should I avoid version 3.0.0 or 3.0.1 if they are newer than 2.9.2?
These versions were yanked from the PyPI registry; users must upgrade specifically to version 3.0.2 or higher to ensure the patch is correctly applied and stable.
Does this flaw affect all BeautifulSoup users?
It only impacts users whose applications allow untrusted, external input to be passed into CSS selector compilation functions, such as those used in scraping or query-building tools.
Original advisory description
References
- WEB https://github.com/facelessuser/soupsieve/security/advisories/GHSA-6655-6qjp-jx7x
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-126191
- WEB https://github.com/facelessuser/soupsieve/pull/300
- WEB https://github.com/facelessuser/soupsieve/commit/dbfa2854ff31a863326bd6660d4e55c6f068db9e
- PACKAGE https://github.com/facelessuser/soupsieve
- WEB https://github.com/facelessuser/soupsieve/releases/tag/3.0
Source records: GHSA-6655-6qjp-jx7x (OSV.dev) · EPSS by FIRST, 2026-11-26.