Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach endpoint parsing untrusted selectors
-
DeliverySend crafted flat selector payload
-
ExploitTrigger quadratic scan in splitWord/uniqs
-
ExecutionPin synchronous parser thread
-
ImpactDeny service to legitimate users
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the consuming application synchronously parse attacker-controlled CSS selectors on an exposed/reachable request path (e.g., a runtime endpoint that feeds untrusted selector strings into parser().astSync or equivalent); the vendor states ordinary build-time parsing of trusted sources is NOT affected. The limiting factors are substantial: untrusted-input parsing at runtime is a non-default, developer-chosen integration pattern, exploitation is availability-only (no data exposure or integrity impact), and the maxNestingDepth guard provides no mitigation because the hostile selector has zero nesting depth. Authentication is not required (CVSS PR:N), so where the precondition holds, remote unauthenticated attackers can trigger it. |
| Impact | This is a moderate, conditional risk rather than a top-tier priority. The CVSS vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, base 5.9) correctly captures the nature of the flaw: a network-reachable, unauthenticated availability-only CPU-exhaustion bug (CWE-400) with high attack complexity, because exploitation depends on an application choosing to synchronously parse attacker-controlled CSS selectors in an exposed request path - explicitly NOT the ordinary build-time, trusted-source usage that dominates deployments. There is no EPSS score, no KEV listing, and no weaponized exploit in the provided data (exploitation status: no public exploit identified at time of analysis); the GitHub commit ships regression/complexity tests, not a drop-in attack tool, so POC availability should not be treated as confirmed. The quadratic-parsing mechanism is well-documented and the payload is trivial to construct ('.a.a.a...'), which argues the bug is genuinely reproducible, but the narrow precondition (runtime parsing of untrusted selectors) sharply limits the real-world exploitable population. Net: a credible single-core DoS for the small subset of services that expose selector parsing to untrusted input, and effectively a non-issue for the large majority of consumers that parse only trusted CSS at build time. No key signals are directly conflicting, but the absence of EPSS/KEV/SSVC data means exploitation likelihood cannot be quantified from the input. |
| Exploit ScenarioDerived | An application exposes an HTTP endpoint that accepts user-supplied CSS selectors and parses them synchronously with postcss-selector-parser (for example a theming, CSS-sanitization, or query-builder feature). An unauthenticated attacker submits a single long flat selector such as '.a' repeated tens of thousands of times, triggering quadratic scanning in splitWord()/uniqs() and pinning a parser thread, degrading or denying service for other users. No public weaponized exploit is provided, but the fix's own complexity tests demonstrate the payload shape (a repeated atom as one word token). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 02, 2026
A crafted flat CSS selector can stall a synchronous parser thread in postcss-selector-parser versions prior to 7.1.6, because class and ID index lists are scanned repeatedly inside parsing passes that should be linear, producing quadratic (O(n^2)) parse cost. Only consumers that synchronously parse untrusted selector strings on an exposed request path are affected; the vendor explicitly notes ordinary build-time parsing of trusted sources is not affected. The issue is remotely triggerable by unauthenticated attackers where that precondition holds (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H, 5.9), is availability-only with no confidentiality or integrity impact, and there is no public exploit code and no confirmed active exploitation (no KEV listing) at time of analysis. A vendor-released patch, version 7.1.6, is available.
RemediationAI
Upgrade to postcss-selector-parser 7.1.6, which is the vendor-released patch (release https://github.com/postcss/postcss-selector-parser/releases/tag/7.1.6); the fix is contained in commit 62b191792df0a0bc56062e5a875bc74aae2a51cd and replaces all linear index lookups with Set membership, so no API change is required. If an immediate upgrade is not possible, the most effective compensating control is to stop calling the parser synchronously on untrusted input: move selector parsing to a worker thread or child process with a hard CPU/wall-clock timeout, accepting the added operational complexity and the risk that a stalled worker still consumes a core unless the timeout terminates it. Where selectors must be parsed inline, add a pre-validation bottleneck before the parser - reject or truncate any single flat selector token exceeding a small length threshold (for example a few hundred characters or a bounded number of '.'/'#' indexes), or reject inputs whose class/ID index count is disproportionate to the number of whitespace-separated tokens - with the trade-off that legitimate very large generated selectors may be refused and thresholds must be tuned per application. Restricting the endpoint that accepts selector input to authenticated or trusted callers reduces the attack surface but does not remove the flaw, since CVSS records PR:N. Note that maxNestingDepth tuning is explicitly ineffective here because the hostile selector has zero nesting depth, and generic WAF signature blocking is likely unreliable against a payload that is syntactically valid CSS.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in npm
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PostCSS Selector Parser is a standalone JavaScript CSS selector parser that integrates with PostCSS but does not depend on it. The defect is an uncontrolled resource consumption condition (CWE-400) rooted in the tokenizer: '.' and '#' are not treated as word delimiters, so a flat selector such as '.a.a.a.a...' or '#a#a#a...' arrives at Parser.splitWord() as a single word token that carries n class or ID indexes rather than n separate tokens. Three passes inside the parser then perform repeated linear scans over those index arrays: uniqs(), which deduplicated with Array.prototype.filter combined with indexOf; the indices.forEach loop, which called hasClass.indexOf and hasId.indexOf per index; and a separate Sass-interpolation filtering pass that called interpolations.indexOf per index. Each of these makes total work grow with the square of the number of indexes, so a sufficiently long hostile selector pins a CPU core for an attacker-chosen duration. The maxNestingDepth guard does not mitigate the issue because a flat selector has zero nesting depth. The upstream fix (commit 62b191792df0a0bc56062e5a875bc74aae2a51cd) replaces each linear lookup with Set-based membership (classIndexes, idIndexes, interpolationIndexes, and a Set-based uniqs()), restoring linear-time behavior while preserving first-occurrence ordering; regression tests assert that parsing one huge flat token costs less than roughly twice parsing the same atoms space-separated.
Know when Postcss gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
AV:N and PR:N since an unauthenticated remote selector reaches the parser; AC:H because the victim app must synchronously parse untrusted selectors (non-default); impact is availability-only, so C:N/I:N/A:H.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 25 npm packages depend on postcss-selector-parser (8 direct, 18 indirect)
Ecosystem-wide dependent count for version 7.0.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
The package postcss before 8.2.13 are vulnerable to Regular Expression Denial of Service (ReDoS) via getAnnotationURL()
Path traversal in PostCSS npm package (versions through 8.5.22) allows disclosure of arbitrary `.map` files from the ser
The package postcss from 7.0.0 and before 8.2.10 are vulnerable to Regular Expression Denial of Service (ReDoS) during s
Uncontrolled recursion in PostCSS up to 7.1.1 allows remote attackers to trigger denial of service via crafted CSS input
PostCSS versions prior to 8.5.10 fail to escape `</style>` sequences when stringifying CSS Abstract Syntax Trees, allowi
An issue was discovered in PostCSS before 8.4.31. Rated medium severity (CVSS 5.3), this vulnerability is remotely explo
EUVD-2026-91741
GHSA-rj75-hqrm-r3gf
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB