PostCSS: Quadratic complexity in flat selector parsing allows CPU exhaustion
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
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| postcss | postcss-selector-parser | before 7.1.6 | 7.1.6 | Patch available | CNA |
| — | postcss-selector-parser (npm) | 7.0.0 to before 7.1.6 | 7.1.6 | Patch available | GHSA-rj75-hqrm-r3gf |
| — | postcss-selector-parser (npm) | before 6.1.5 | 6.1.5 | Patch available | GHSA-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
- 2026-10-02 Threatist record created from CVE-2026-104844
- 2026-10-06 Alias added: GHSA-rj75-hqrm-r3gf
- 2026-10-06 Fix available: npm/[email protected] · GHSA-rj75-hqrm-r3gf
- 2026-10-06 CVSS score added · GHSA-rj75-hqrm-r3gf
- 2026-10-06 Weakness changed · GHSA-rj75-hqrm-r3gf
- 2026-10-06 5 new references · GHSA-rj75-hqrm-r3gf
References
Other 7
- https://github.com/postcss/postcss-selector-parser/security/advisories/GHSA-rj75-hqrm-r3gf
- https://github.com/postcss/postcss-selector-parser/commit/62b191792df0a0bc56062e5a875bc74aae2a51cd
- https://github.com/postcss/postcss-selector-parser/releases/tag/7.1.6
- https://github.com/postcss/postcss-selector-parser/pull/346
- https://github.com/postcss/postcss-selector-parser/commit/70b0779c843462197380d25daa02d1528bf7eae5
- https://github.com/postcss/postcss-selector-parser
- https://github.com/postcss/postcss-selector-parser/releases/tag/6.1.5
More postcss vulnerabilities
- 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
Sources
- CVE-2026-104844 · CVE Program
- CVE-2026-104844 · NVD
- FIRST EPSS
- GHSA-rj75-hqrm-r3gf · GitHub Advisory Database · CC BY 4.0
- CVE-2026-104844 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences