All vulnerabilities

npm

CVE-2026-45623

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

Severity
High 7.5
Published
23 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
8.5.12
Exploit chance
0.6% in the next 30 daysHigher than 49% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Information exposure (CWE-200)Path traversal (CWE-22)
Attack
Over the network · No login needed · No user action needed
Attacker can
Read data
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Also known as
GHSA-6g55-p6wh-862q
Sources
OSV.dev and GitHub

Description

PostCSS's 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.).

The dangerous chain lives in lib/previous-map.js and is wired into every Input construction at lib/input.js:70-77.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
postcssnpm · osv:npm:postcss
  • Every version before 8.5.12

About postcss

Weekly downloads (npm)
426,592,693npm, 17 Nov 2026

References