CVE-2026-126190: Soup Sieve: Polynomial-time denial of service in the descendant combinator
Published 2026-11-13 · Updated 2026-11-13 · Also known as GHSA-mmhr-3c5m-f64f
Summary
Soup Sieve versions before 4.0.0 have a polynomial-time denial-of-service flaw in descendant combinators, where small deeply nested documents can consume CPU for seconds to minutes. Applications that run CSS selectors against untrusted HTML or XML should upgrade to soupsieve 4.0.0.
Who is affected
Deployments are affected when they run Soup Sieve selectors with descendant combinators against documents that untrusted users can influence, including through Beautiful Soup select(), select_one(), or css.select(). A small, deeply nested document can tie up a worker, and the worst case occurs when the leftmost selector part never matches. Applications that only run selectors against trusted documents are not affected.
Exploitability
The CVSS 3.1 vector is AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H with a 7.5 HIGH base score, indicating network reachability, low complexity, no privileges, no user interaction, and an availability-only impact. EPSS is 0.005 at the 0.460 percentile, and CISA KEV is no, so this record does not document active exploitation.
Remediation
- Upgrade the PyPI soupsieve package to 4.0.0, the fixed version listed in this record.
- If upgrade is not immediately possible, use fewer descendant combinators in selectors run on untrusted documents, prefer child combinators where document structure is known, limit document size and nesting depth, and run selection under a time limit in a stoppable worker process.
- Do not rely on the NOCACHE flag for untrusted input; the description states that it uses the old uncached matching and remains subject to polynomial time with descendant combinators.
How to check your project
- Inspect requirements files, lockfiles, or installed package metadata for soupsieve versions below 4.0.0.
- Run python -c "import soupsieve; print(soupsieve.__version__)" in each environment and compare the result against 4.0.0.
- Search application code for Beautiful Soup select()/select_one() and direct Soup Sieve calls that use descendant combinators on untrusted HTML or XML.
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, < 4.0.0 | 4.0.0 | python -m pip install 'soupsieve>=4.0.0' |
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
Which versions are affected?
PyPI soupsieve versions from 0 up to but not including 4.0.0 are affected; 4.0.0 is the fixed version listed in this record.
Does exploitation require privileges or user interaction?
No. The CVSS vector AV:N/AC:L/PR:N/UI:N indicates network reachability, low complexity, no privileges, and no user interaction.
Is this vulnerability known to be exploited in the wild?
No active exploitation is documented in this record: CISA KEV is no and EPSS is 0.005 at the 0.460 percentile.
Original advisory description
References
- WEB https://github.com/facelessuser/soupsieve/security/advisories/GHSA-mmhr-3c5m-f64f
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-126190
- WEB https://github.com/facelessuser/soupsieve/pull/351
- WEB https://github.com/facelessuser/soupsieve/commit/ff1a5ce7e5addc31626d7b6053511fecdb4f6320
- PACKAGE https://github.com/facelessuser/soupsieve
- WEB https://github.com/facelessuser/soupsieve/releases/tag/4.0
Source records: GHSA-mmhr-3c5m-f64f (OSV.dev) · EPSS by FIRST, 2026-11-26.