Read the docs

PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion

Priority LOW 27CWE-400Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
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-400.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00389 33rd percentileScored 2026-11-07
Fix Fixed postcss-selector-parser (postcss): 7.1.6postcss-selector-parser (npm): 7.1.6, 6.1.5

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
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
postcsspostcss-selector-parserbefore 7.1.67.1.6Patch availableCNA
—postcss-selector-parser (npm)7.0.0 to before 7.1.67.1.6Patch availableGHSA-rj75-hqrm-r3gf
—postcss-selector-parser (npm)before 6.1.56.1.5Patch availableGHSA-rj75-hqrm-r3gf
  • postcss-selector-parser Vendorpostcss Affected before 7.1.6 Fixed in 7.1.6 Patch available CNA
  • postcss-selector-parser (npm) Vendor— Affected 7.0.0 to before 7.1.6 Fixed in 7.1.6 Patch available GHSA-rj75-hqrm-r3gf
  • postcss-selector-parser (npm) Vendor— Affected before 6.1.5 Fixed in 6.1.5 Patch available GHSA-rj75-hqrm-r3gf

Remediation

  • Fix · CNA postcss-selector-parser (postcss) Fixed in 7.1.6
  • Fix · GHSA-rj75-hqrm-r3gf postcss-selector-parser (npm) Fixed in 7.1.6 Advisory →
  • Fix · GHSA-rj75-hqrm-r3gf postcss-selector-parser (npm) Fixed in 6.1.5 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat Hardened Images

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-104844
  2. 2026-10-06 Alias added: GHSA-rj75-hqrm-r3gf
  3. 2026-10-06 Fix available: npm/[email protected] · GHSA-rj75-hqrm-r3gf
  4. 2026-10-06 CVSS score added · GHSA-rj75-hqrm-r3gf
  5. 2026-10-06 Weakness changed · GHSA-rj75-hqrm-r3gf
  6. 2026-10-06 5 new references · GHSA-rj75-hqrm-r3gf

References

  • TI-2026-33367 PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments CVSS 3.1CRITICAL 9.1
  • TI-2026-51730 PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) leads to Arbitrary .map File Disclosure CVSS 3.1HIGH 7.5
  • TI-2026-48533 Information disclosure in postcss CVSS 4.0MEDIUM 6.3
  • TI-2026-29908 PostCSS has XSS via Unescaped </style> in its CSS Stringify Output CVSS 3.1MEDIUM 6.1
  • TI-2021-06075 Regular expression denial of service (ReDoS) in postcss CVSS 3.1HIGH 7.5
  • TI-2023-23794 An issue was discovered in PostCSS before 8.4.31. CVSS 3.1MEDIUM 5.3
See all 7 →

Sources