Inefficient Algorithmic Complexity Affecting postcss-selector-parser package, versions <7.1.6


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.39% (32nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-POSTCSSSELECTORPARSER-20510276
  • published5 Oct 2026
  • disclosed2 Oct 2026
  • creditUnknown

Introduced: 2 Oct 2026

NewCVE-2026-104844  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade postcss-selector-parser to version 7.1.6 or higher.

Overview

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the uniqs helper and index-membership checks in src/parser.js when parsing flat selectors (e.g. .a.a.a...) containing a large number of class or ID tokens. The original implementation uses Array.indexOf inside a filter callback and repeated linear scans of the hasClass/hasId arrays, producing quadratic time complexity proportional to the number of tokens. An attacker who can supply selector input to the parser can trigger CPU exhaustion by providing a long flat selector, pinning a CPU core and causing the process to become unresponsive.

CVSS Base Scores

version 4.0
version 3.1