Skip to content
OpenAdvisories
Medium · 5.9 CVE-2026-104844 EUVD-2026-91741GHSA-rj75-hqrm-r3gf

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

Published Oct 2, 2026 · Updated Oct 2, 2026 · Assigned by GitHub_M

Description

PostCSS Selector Parser is a CSS selector parser that integrates with PostCSS but does not require it. Prior to 7.1.6, src/parser.js splitWord() can receive a flat selector as one word token carrying many class or ID indexes because period and hash characters are not tokenizer word delimiters. The uniqs() deduplication and per-index class and ID membership checks repeatedly scan the class and ID index arrays, while a separate Sass-interpolation filtering pass also performs repeated linear scanning. Together, these passes make parsing quadratic in the number of indexes and allow a crafted selector to occupy a synchronous parser thread. The maxNestingDepth guard does not mitigate the issue because the hostile selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in an exposed request path are affected; ordinary build-time parsing of trusted sources is not affected. This issue is fixed in version 7.1.6.

Affected products

VendorProductAffectedFixed
postcss postcss-selector-parser < 7.1.6 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Tumbleweed git-bug 0.11.0-2.1 openSUSE-SU-2026:12083-1

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling jupyter-base-notebook 7.6.3-r2 —
Wolfi rolling langfuse-3-worker 3.225.12-r2 —
Wolfi rolling npm-12 12.2.0-r2 —
Wolfi rolling pulumi-language-nodejs 3.268.0-r1 —
Wolfi rolling renovate 44.133.0-r4 —
Wolfi rolling vitess-23 23.0.7-r2 —

Affected packages

EcosystemPackageAffectedFixedRecord
npm postcss-selector-parser >= 7.0.0, < 7.1.6 7.1.6 GHSA-rj75-hqrm-r3gf
npm postcss-selector-parser < 6.1.5 6.1.5 GHSA-rj75-hqrm-r3gf

Advisories 1

References