CVE-2026-45623: PostCSS arbitrary file read via sourceMappingURL path traversal

CVE-2026-45623 · Severity: high · CVSS 7.5 · Published 2026-07-27

PostCSS, a widely used tool for transforming CSS styles, contains a vulnerability that allows an attacker to read files from the server's local filesystem. By providing a specially crafted CSS file, an attacker can trick the software into attempting to load a source map from an arbitrary location, such as system configuration files or sensitive environment variables. This can lead to the exposure of sensitive data (like the first few characters of passwords or API keys) and can be used to crash the service by forcing it to read extremely large files.

Technologies: postcss (npm). Vendors: npm.

Quick answers

Is CVE-2026-45623 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45623 being exploited in the wild.
How severe is CVE-2026-45623?
High severity, with a CVSS score of 7.5, published 27 July 2026.
Which products and versions are affected?
postcss (npm) SEMVER:introduced=0,fixed=8.5.12.
Is there a fix for CVE-2026-45623?
Yes. postcss (npm): upgrade to 8.5.12 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45623 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-45623?
Check whether you run postcss (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • postcss (npm): upgrade to 8.5.12 or later
    npm install postcss@8.5.12

Technical details

A path traversal and arbitrary file read vulnerability exists in PostCSS's PreviousMap component. When the process() method encounters a /*# sourceMappingURL=PATH */ comment, it dereferences the PATH against the local filesystem using readFileSync without sufficient validation, scheme allowlisting, or traversal checks. If the target file is not a valid JSON source map, the resulting SyntaxError from JSON.parse embeds the first ~10 bytes of the file content, which may then be leaked through application error logs or HTTP responses. This vulnerability can also be used as a file-existence oracle or a DoS vector by targeting large files or device files like /dev/zero. The issue is present in default configurations and is fixed in version 8.5.12.

Affected products

  • postcss postcss <= 8.5.11

Identifiers

  • CVE-2026-45623
  • GHSA-6g55-p6wh-862q

Timeline

  • 2026-07-20: advisory: GitHub Security Advisory published
  • 2026-07-27: disclosed: NVD publication date
  • 2026-07-27: patched: Fix released in version 8.5.12

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.