CVE-2026-45623 PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments
Attackers can read arbitrary local files and cause denial of service by injecting malicious sourceMappingURL comments into CSS processed by PostCSS.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-45623?
CVE-2026-45623 is a high-severity path traversal vulnerability in postcss, published on 27 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Which versions are affected by CVE-2026-45623?
2 open source packages ship an affected version, including postcss. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
postcss npm | All versions | 8.5.12 |
postcss npm | All versions | 8.5.12 |
Products include Postcss Postcss.
How do I fix CVE-2026-45623?
Upgrade postcss to 8.5.12 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-45623 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45623 exists.
Other vulnerabilities in postcss
- CVE-2026-69153 PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappingURL reads arbitrary .map files when `from` is unset
- CVE-2023-44270 PostCSS line return parsing error
- CVE-2021-23382 Regular Expression Denial of Service (ReDoS)
- CVE-2021-23368 Regular Expression Denial of Service (ReDoS)
Sources
Also known as CLSA-2026-1784856189, CLSA-2026-1784856448, CLSA-2026-1784943201, CLSA-2026-1785117457, CLSA-2026-1785117465, CLSA-2026-1785204444 and 18 more.