All vulnerabilities

npm

CVE-2026-69153

PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappingURL reads arbitrary .map files when `from` is unset

Severity
Medium
Published
3 Aug 2026
Last changed
10 Sept 2026
Added to UpHeron
22 Oct 2026
Fixed in
8.5.23
Exploit chance
0.5% in the next 30 daysHigher than 39% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Information exposure (CWE-200)Path traversal (CWE-22)
Also known as
GHSA-fxqj-rqcc-2cmp
Sources
OSV.dev and GitHub

Description

The fix for GHSA-6g55-p6wh-862q added a guard in lib/previous-map.js PreviousMap.loadFile() that restricts an attacker-controlled sourceMappingURL (from a CSS comment) to a .map extension and, for untrusted maps, rejects .. traversal and absolute paths. The traversal/absolute rejection is nested inside if (cssFile) { ... }. When PostCSS is invoked without the from option, cssFile is falsy and that branch is skipped, leaving only the .map extension check.

PreviousMap is constructed by lib/input.js whenever pathAvailable && sourceMapAvailable (under Node with source-map available), independent of opts.from/opts.map (the constructor returns early only for opts.map === false). So postcss([]).process(css) on attacker CSS reaches loadFile with cssFile undefined, and an attacker /*# sourceMappingURL=/abs/path/x.map */ (or ../-traversing path) is read via readFileSync.

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.23

About postcss

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

References