CVE-2026-104844: CWE-400: Uncontrolled Resource Consumption in postcss postcss-selector-parser
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.
AI Analysis
Technical Summary
The vulnerability in postcss-selector-parser arises because the splitWord() function treats flat selectors containing many class or ID indexes as a single word token, since period and hash characters are not treated as word delimiters. This causes multiple passes—uniqs() deduplication, class and ID membership checks, and Sass-interpolation filtering—to repeatedly scan large arrays, resulting in quadratic time complexity relative to the number of indexes. An attacker can craft selectors that exploit this inefficiency to consume excessive CPU resources synchronously, leading to denial of service. The maxNestingDepth guard does not prevent this because the malicious selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in exposed request paths are vulnerable. The issue is resolved in version 7.1.6.
Potential Impact
An attacker can cause a denial of service by submitting specially crafted CSS selectors that trigger excessive CPU consumption during synchronous parsing. This impacts availability but does not affect confidentiality or integrity. The vulnerability only affects environments that parse untrusted selectors synchronously in exposed request paths, not typical build-time parsing of trusted sources.
Mitigation Recommendations
Upgrade postcss-selector-parser to version 7.1.6 or later where this issue is fixed. If upgrading is not immediately possible, avoid synchronously parsing untrusted selectors in exposed request paths to mitigate the risk.
CVE-2026-104844: CWE-400: Uncontrolled Resource Consumption in postcss postcss-selector-parser
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.
CVSS v3.1
Score 5.9medium
Affected software
postcss
postcss-selector-parser
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in postcss-selector-parser arises because the splitWord() function treats flat selectors containing many class or ID indexes as a single word token, since period and hash characters are not treated as word delimiters. This causes multiple passes—uniqs() deduplication, class and ID membership checks, and Sass-interpolation filtering—to repeatedly scan large arrays, resulting in quadratic time complexity relative to the number of indexes. An attacker can craft selectors that exploit this inefficiency to consume excessive CPU resources synchronously, leading to denial of service. The maxNestingDepth guard does not prevent this because the malicious selector can have zero nesting depth. Only consumers that synchronously parse untrusted selectors in exposed request paths are vulnerable. The issue is resolved in version 7.1.6.
Potential Impact
An attacker can cause a denial of service by submitting specially crafted CSS selectors that trigger excessive CPU consumption during synchronous parsing. This impacts availability but does not affect confidentiality or integrity. The vulnerability only affects environments that parse untrusted selectors synchronously in exposed request paths, not typical build-time parsing of trusted sources.
Mitigation Recommendations
Upgrade postcss-selector-parser to version 7.1.6 or later where this issue is fixed. If upgrading is not immediately possible, avoid synchronously parsing untrusted selectors in exposed request paths to mitigate the risk.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-02T14:38:43.243Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6abfd567a43b0b3b89d3b445
Added to database: 10/02/2026, 16:01:43 UTC
Last enriched: 10/02/2026, 16:16:22 UTC
Last updated: 10/03/2026, 03:09:17 UTC
Views: 11
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.