npm
CVE-2026-73646
PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) leads to Arbitrary .map File Disclosure
- Severity
- High 7.5
- Published
- 24 Jul 2026
- Last changed
- 10 Sept 2026
- Added to UpHeron
- 22 Oct 2026
- Fixed in
- 8.5.18
- Exploit chance
- 0.5% in the next 30 daysHigher than 45% of CVEs. EPSS by FIRST, 19 Nov 2026
- Weakness
- 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-r28c-9q8g-f849
- Sources
- OSV.dev and GitHub
Description
File: lib/previous-map.js Line: 87-98 (loadFile), 129-144 (loadMap)
PostCSS auto-detects a /*# sourceMappingURL=... */ comment inside the CSS text it is asked to parse and, unless the caller explicitly passes map: false, attempts to load that path from disk as a "previous source map." This happens on every postcss.parse() / postcss().process() call by default (opt-out, not opt-in).
loadMap() builds the candidate path via join(dirname(opts.from), annotation), where annotation is the raw, attacker-controlled string from the CSS comment. path.join() normalizes but does not sandbox .. segments, so a ../../../ prefix walks the resolved path outside the intended directory. If opts.from is not set at all, the annotation is used completely unmodified — an absolute path in the CSS comment is read verbatim.
8.5.12 already fixed a strictly worse variant of this (any file, any extension, could be read) by requiring the resolved path to end in .map (loadFile()).
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-45623PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS commentsHigh 7.5 23 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-73646
- GitHub Advisory Database https://github.com/advisories/GHSA-r28c-9q8g-f849