CVE-2026-126190: Soup Sieve: Polynomial-time denial of service in the descendant combinator
Matching a selector that uses the descendant combinator (a b) takes time that grows polynomially with how deeply the document is nested, and each extra descendant combinator in the selector raises the degree by one. A selector with k descendant combinators takes O(n^(k+1)) time on a chain of n nested elements.
An attacker who controls the HTML or XML that an application passes to Soup Sieve (directly, or through Beautiful Soup’s select(), select_one(), css.select(), etc.) can send a very small, deeply nested document that keeps a CPU busy for seconds to minutes against an ordinary selector such as section div div.
References
- github.com/advisories/GHSA-mmhr-3c5m-f64f
- github.com/facelessuser/soupsieve/commit/ff1a5ce7e5addc31626d7b6053511fecdb4f6320
- github.com/facelessuser/soupsieve/pull/351
- github.com/facelessuser/soupsieve/releases/tag/4.0
- github.com/facelessuser/soupsieve/security/advisories/GHSA-mmhr-3c5m-f64f
- nvd.nist.gov/vuln/detail/CVE-2026-126190
Code Behaviors & Features
Detect and mitigate CVE-2026-126190 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →