CVE-2026-45623
PoC massPath Traversal Arbitrary File Read in PostCSS PreviousMap Processing
PostCSS 8.5.11 and earlier mishandle the /*# sourceMappingURL=PATH */ comment: the PreviousMap code dereferences PATH against the local filesystem with no scheme restriction, allowlist, or traversal check when processing any CSS string. An attacker who controls the CSS input, such as a user-uploaded stylesheet, CMS theme, userstyle, or blog-comment renderer content, can make the host Node process read any file readable by it and leak roughly the first 10 bytes of the content through a JSON.parse SyntaxError message, while also gaining a precise file-existence oracle and a controllable-read primitive that can be combined with large-file targets for denial of service. The behavior triggers with PostCSS's default options (no 'from', no 'map', no plugins required), so any pipeline that runs untrusted CSS through PostCSS at runtime is affected. All consumers of PostCSS 8.5.11 and prior are affected; build pipelines handling only trusted, first-party CSS are far less exposed. Exploitation has not been confirmed in the wild (EPSS ~0.6%, not in CISA KEV), but a public advisory with a PoC reference exists.
What to do: Upgrade to PostCSS 8.5.12 or later, and audit your dependency tree (npm ls postcss / lockfiles) since PostCSS is commonly pulled in transitively by build tooling. Where PostCSS runs on untrusted CSS at runtime (CMS themes, uploaded styles, userstyle processors), strip or sanitize sourceMappingURL comments as an interim mitigation until patched. No in-the-wild exploitation is known; patching build-time-only use of trusted CSS is lower priority.
| postcss | <= 8.5.11 (fixed in 8.5.12) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
PostCSS takes a CSS file and provides an API to analyze and modify its rules by transforming the rules into an Abstract Syntax Tree. In versions 8.5.11 and prior, the PreviousMap parses the /*# sourceMappingURL=PATH */ comment from any CSS string passed to process() and dereferences PATH against the local filesystem with no scheme, allowlist, or traversal check. An attacker who controls the CSS input can cause the host process to read any file readable by Node and leak the first ~10 bytes of its content through the resulting JSON.parse SyntaxError message. The bug also yields a precise file-existence oracle and a controllable-read primitive that may be combined with large-file targets for DoS. The behaviour is triggered with PostCSS's default options — no from, no map, no plugins required — and is therefore reachable from any pipeline that runs untrusted CSS through PostCSS (CMS themes, user-uploaded styles, browser-extension/userstyle processors, build pipelines for third-party packages, blog comment renderers, etc.). This issue has been fixed in version 8.5.12.
- Vendors
- postcss
- Products
- postcss
- Weakness
- CWE-22, CWE-200
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
In the news0 stories
No ingested article mentions this CVE yet.