All vulnerabilities

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()).

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

About postcss

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

References