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
- 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.
Affected software
| Software | Affected versions |
|---|---|
postcssnpm · osv:npm:postcss |
|
About postcss
- Weekly downloads (npm)
- 426,592,693npm, 17 Nov 2026
Vulnerabilities in postcss
- In our list
- 4
- Published in the last 12 months
- 4
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-69153PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappingURL reads arbitrary .map files when `from` is unsetMedium 3 Aug 2026
- CVE-2026-73646PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) leads to Arbitrary .map File DisclosureHigh 7.5 24 Jul 2026
- CVE-2026-41305PostCSS has XSS via Unescaped </style> in its CSS Stringify OutputMedium 6.1 24 Apr 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-45623
- GitHub Advisory Database https://github.com/advisories/GHSA-6g55-p6wh-862q