Read the docs

Polynomial-time denial of service in Soup Sieve descendant combinator

Priority MEDIUM 40CWE-407Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-407.

Summary

Soup Sieve, a CSS selector library used with Beautiful Soup 4, is affected before version 4.0. Its descendant combinator matching repeatedly walks the same ancestors, so each extra descendant combinator raises the polynomial cost of matching deeply nested HTML or XML (CWE-407). A remote attacker who supplies a crafted untrusted document can tie up a worker for seconds or minutes when the application runs selectors such as section div div against it, with no authentication needed. Trusted-only documents are not affected.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

Description from the CNA

Soup Sieve is a CSS selector library designed to be used with Beautiful Soup 4. Prior to 4.0, Soup Sieve repeatedly walks the same ancestors while matching descendant combinators, and each additional descendant combinator raises the polynomial degree of the work on deeply nested attacker-influenced HTML or XML. Applications using selectors such as section div div through select(), select_one(), or Beautiful Soup CSS APIs against untrusted documents can have a worker occupied for seconds or minutes, while trusted-only document processing is not affected. Selectors compiled with NOCACHE continue to use the old uncached behavior. This issue is fixed in version 4.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00538 45th percentileScored 2026-11-16
Fix Fixed soupsieve (facelessuser): 4.0soupsieve (PyPI): 4.0.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
facelessusersoupsievebefore 4.04.0Patch availableCNA
—soupsieve (PyPI)before 4.0.04.0.0Patch availableGHSA-mmhr-3c5m-f64f
  • soupsieve Vendorfacelessuser Affected before 4.0 Fixed in 4.0 Patch available CNA
  • soupsieve (PyPI) Vendor— Affected before 4.0.0 Fixed in 4.0.0 Patch available GHSA-mmhr-3c5m-f64f

Remediation

Upgrade the soupsieve package to version 4.0.0 or later, which fixes the issue in version 4.0. Selectors compiled with NOCACHE keep the old uncached behavior. The sources list no vendor advisory for this fix.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

  • Fix · CNA soupsieve (facelessuser) Fixed in 4.0
  • Fix · GHSA-mmhr-3c5m-f64f soupsieve (PyPI) Fixed in 4.0.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from CVE-2026-126190
  2. 2026-11-13 Alias added: GHSA-mmhr-3c5m-f64f
  3. 2026-11-13 Fix available: PyPI/[email protected] · GHSA-mmhr-3c5m-f64f
  4. 2026-11-13 CVSS score added · GHSA-mmhr-3c5m-f64f
  5. 2026-11-13 Weakness changed · GHSA-mmhr-3c5m-f64f
  6. 2026-11-13 6 new references · GHSA-mmhr-3c5m-f64f
  7. 2026-11-13 CISA SSVC decision points changed

References

  • TI-2026-90415 Soup Sieve exponential ReDoS in selector compilation via \9-run CVSS 3.1HIGH 7.5
  • TI-2026-47703 pymdown-extensions: Exponential-backtracking ReDoS in caret, tilde, betterem, and magiclink inline processors CVSS 3.1HIGH 7.5
  • TI-2026-36631 Soup Sieve: Regular Expression Denial of Service (ReDoS) in soupsieve Selector Parser CVSS 3.1HIGH 7.5
  • TI-2026-36630 Soup Sieve: Memory Exhaustion via Large Comma-Separated Selector Lists in soupsieve CVSS 3.1HIGH 7.5
  • TI-2023-15603 Arbitrary file inclusion with the pymdowm-snippets extension CVSS 3.1HIGH 7.5
  • TI-2026-90424 Uncontrolled recursion in Soup Sieve lets selectors exhaust stack CVSS 3.1MEDIUM 5.3
See all 13 →

Sources