Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft recursive CSS payload
-
DeliverySubmit to CSS processing endpoint
-
ExploitTrigger PostCSS AST serialization
-
ExecutionExhaust stack via uncontrolled recursion
-
ImpactCrash Node.js process
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
|
| Exploitation Conditions | Exploitation requires server-side PostCSS deployment that processes untrusted user-generated CSS input. The vulnerability does NOT affect standard PostCSS usage in developer build pipelines (webpack, Rollup, Parcel) where developers control CSS sources. Specific vulnerable scenarios include: platforms accepting custom CSS theme uploads for server-side compilation, CSS validation/linting APIs processing arbitrary user submissions, automated build systems pulling and processing CSS from untrusted external repositories, or SaaS applications allowing customers to inject custom stylesheets compiled on the backend. The UI:R CVSS component indicates user interaction is required, meaning the attacker must induce the target system or user to process the malicious CSS through PostCSS-direct remote code execution against passive servers is not possible. Additionally, the target must run PostCSS versions <=7.1.1, as later versions may have architectural changes preventing the recursion. The 'low risk' vendor assessment stems from the rarity of production systems processing untrusted CSS server-side, which limits real-world attack surface compared to theoretical CVSS scoring. |
| Impact | Real-world risk is MODERATE despite the 4.3 CVSS Base Score. The CVSS vector (AV:N/AC:L/PR:N/UI:R) indicates network-accessible exploitation with low complexity but requires user interaction, limiting automated mass exploitation. The UI:R (user interaction required) component significantly constrains attack scenarios-an attacker must induce a victim to process malicious CSS through PostCSS, which typically occurs in developer toolchains rather than production runtime. Publicly available exploit code (E:P in temporal metrics) lowers the barrier to exploitation for targeted attacks. However, the vendor's risk assessment highlights a critical constraint: PostCSS is predominantly used in build-time CSS compilation where developers control input sources, NOT for processing untrusted user-generated CSS at runtime. Exploitation scenarios are thus limited to platforms accepting arbitrary CSS uploads for server-side processing (custom CSS themes, CSS validation services, automated build systems processing external stylesheets). The 'Information Disclosure' tag in the input data appears misapplied-CWE-674 and A:L impact indicate availability disruption, not confidentiality breach. No EPSS score provided, but KEV status is absent, confirming no evidence of widespread active exploitation. SSVC decision: exploitation requires specific server-side CSS processing workflows uncommon in standard web applications, making this automatable:no, technical_impact:partial (temporary DoS). |
| Exploit ScenarioDerived | An attacker crafts a malicious CSS file with deeply nested or recursive selector structures designed to trigger infinite recursion in PostCSS's AST serialization. They submit this CSS to a web application offering custom theme uploads or CSS validation services that process user-provided stylesheets server-side using vulnerable PostCSS versions. When the server invokes PostCSS toString on the malicious AST, the recursion exhausts stack memory, crashing the Node.js worker process and temporarily disrupting the CSS processing service. Public exploit code available at https://gist.github.com/bx33661/581e3a38134601c04e19b4dfc9b459b9 demonstrates the attack payload structure. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 24, 2026
Uncontrolled recursion in PostCSS up to 7.1.1 allows remote attackers to trigger denial of service via crafted CSS input requiring user interaction. The vulnerability resides in the toString function of AST serialization logic (src/selectors/container.js). Publicly available exploit code exists (EPSS exploitation probability should be assessed). Vendor considers this low-risk since most users compile their own CSS rather than processing untrusted user-generated CSS, indicating limited real-world attack surface in typical deployment scenarios.
RemediationAI
Upgrade PostCSS to version 7.1.2 or later if a patch exists, or migrate to PostCSS 8.x which likely addresses the AST serialization architecture-confirm exact fixed version at the official PostCSS GitHub repository (https://github.com/postcss/postcss) or npm package changelog. The VulDB references (https://vuldb.com/vuln/365321, https://vuldb.com/submit/813080) provide vulnerability details but do not link to an official vendor patch advisory, requiring independent verification of fix availability. If immediate upgrade is not feasible, implement these compensating controls with trade-offs: (1) Input validation-limit CSS input size and nesting depth before PostCSS processing (reduces functionality for complex legitimate stylesheets but blocks deeply nested malicious payloads), (2) Resource limits-configure Node.js process with --stack-size limits and timeout enforcement for PostCSS operations (may cause false-positive failures on large legitimate files), (3) Isolation-run PostCSS processing in sandboxed containers with CPU/memory quotas and automatic restart on crash (adds infrastructure complexity but contains impact). These mitigations only apply to server-side PostCSS usage processing untrusted CSS; standard build-time usage with developer-controlled CSS requires no action per vendor assessment.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
PostCSS is a popular JavaScript-based CSS parser and transformation tool used in modern web development build pipelines. This vulnerability (CWE-674: Uncontrolled Recursion) affects the Abstract Syntax Tree (AST) serialization component, specifically the toString method in src/selectors/container.js. When parsing maliciously crafted CSS, the AST serialization logic enters infinite or excessive recursion, exhausting stack space and causing the Node.js process to crash. The affected CPE string (cpe:2.3:a:n/a:postcss:*:*:*:*:*:*:*:*) indicates versions up to 7.1.1, though the CPE vendor field shows 'n/a' suggesting incomplete product identification in the NVD record. PostCSS 8.x and later may have addressed this architectural issue, but version specifics require vendor confirmation.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:P
Primary rating from Vendor (VulDB) · only source for this CVE.
CVSS VectorVendor: VulDB
Lifecycle Timeline
2DescriptionCVE.org
A vulnerability was determined in postcss up to 7.1.1. Affected is the function toString of the file src/selectors/container.js of the component AST Serialization. Executing a manipulation can lead to uncontrolled recursion. It is possible to launch the attack remotely. The exploit has been publicly disclosed and may be utilized. The vendor explains, that according to his definition "DoS on server-side on user-generated CSS is low risk for us (since most users compile own CSS with PostCSS)."
Blast Radius
ecosystem impact- 28 npm packages depend on postcss-selector-parser (7 direct, 21 indirect)
Ecosystem-wide dependent count for version 6.1.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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
PostCSS versions prior to 8.5.10 fail to escape `</style>` sequences when stringifying CSS Abstract Syntax Trees, allowi
A crafted flat CSS selector can stall a synchronous parser thread in postcss-selector-parser versions prior to 7.1.6, be
An issue was discovered in PostCSS before 8.4.31. Rated medium severity (CVSS 5.3), this vulnerability is remotely explo
EUVD-2026-31571
GHSA-w9m9-85wc-3x92
NVD
CVE.org
EPSS
VulDB
Exploit-DB