Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. soupsieve
  4. ›
  5. CVE-2026-86000

CVE-2026-86000: Soup Sieve: Polynomial-time ReDoS (O(n²)) in the `IDENTIFIER` / `VALUE` selector sub-patterns

September 17, 2026

soupsieve compiles CSS selector strings with a set of hand-written regular expressions. The shared IDENTIFIER sub-pattern (also embedded in VALUE, and therefore in attribute selectors) places two adjacent quantified groups over overlapping character classes: (?:[classA]|ESC)+(?:[classB]|ESC)*, where both classes match ordinary identifier characters such as a. When a selector contains a long identifier/value run that must ultimately fail to match (e.g. an attribute value with no closing ], or an identifier followed by an invalid character), the regex engine backtracks across all O(n) ways to split the run between the + group and the * group, giving O(n²) parse time. A single attacker-controlled selector of a few kilobytes stalls the interpreter for many seconds of CPU; tens of kilobytes reach minutes.

References

  • github.com/advisories/GHSA-gjv8-xp57-g29c
  • github.com/facelessuser/soupsieve/commit/ce44e4996e6632871c18cdd7a7fb641be8ef34ef
  • github.com/facelessuser/soupsieve/releases/tag/2.9
  • github.com/facelessuser/soupsieve/security/advisories/GHSA-gjv8-xp57-g29c
  • nvd.nist.gov/vuln/detail/CVE-2026-86000

Code Behaviors & Features

Detect and mitigate CVE-2026-86000 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.9.0

Fixed versions

  • 2.9.0

Solution

Upgrade to version 2.9.0 or above.

Impact 5.3 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-1333: Inefficient Regular Expression Complexity
  • CWE-400: Uncontrolled Resource Consumption

Source file

pypi/soupsieve/CVE-2026-86000.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 22 Sep 2026 12:20:25 +0000.