CVE-2026-45623 PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments

High 7.5 Published Updated

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.

Weakness: CWE-22, CWE-200

Which versions are affected by CVE-2026-45623?

2 open source packages ship an affected version, including postcss. It affects 1 product.

PackageAffectedFixed in
postcss npmAll versions8.5.12
postcss npmAll versions8.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.

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.

Is CVE-2026-45623 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free