Description
PostCSS takes a CSS file and provides an API to analyze and modify its rules by transforming the rules into an Abstract Syntax Tree. Prior to 8.5.18, lib/previous-map.js loadMap() passes attacker-controlled sourceMappingURL values to join(dirname(opts.from), annotation), and loadFile() permits traversed or absolute .map paths, allowing untrusted CSS processed without map: false to disclose sourcesContent from arbitrary reachable .map files through result.map. This issue is fixed in version 8.5.18.
Published: 2026-08-17
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

PostCSS transforms CSS into an abstract syntax tree and can load source maps via the sourceMappingURL header. Prior to version 8.5.18, the library concatenated attacker‑controlled sourceMappingURL values with the directory of the input file, then opened the resulting path without validating or restricting it. This path traversal flaw allowed an attacker to supply a malicious sourceMappingURL that points to an arbitrary .map file on the system, causing PostCSS to read and expose the file’s contents through the result.map object. The vulnerability is fixed in version 8.5.18.

Affected Systems

PostCSS (postcss:postcss) versions older than 8.5.18 are vulnerable, regardless of the build or deployment platform, as the flaw resides in the core library code.

Risk and Exploitability

The CVSS score of 7.5 indicates a high severity disclosure flaw. EPSS is not available, so the likelihood of exploitation is unknown, and the vulnerability is not listed in the CISA KEV catalog. An attacker who can supply CSS files to a system that processes them with PostCSS can trigger the traversal and read arbitrary source map files, potentially retrieving source code or configuration data stored in those maps. The impact is largely confidentiality damage, with no known denial‑of‑service or privilege‑escalation vector.

Generated by OpenCVE AI on August 17, 2026 at 16:20 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostCSS to version 8.5.18 or later to apply the vendor‑supplied fix.
  • If an immediate upgrade is not possible, configure PostCSS to disable source‑map loading by setting map: false when invoking it, which prevents the loadMap logic from executing.
  • As a temporary safeguard, strip or sanitize the sourceMappingURL header from incoming CSS files before they reach PostCSS, or validate that any path referenced is within an allowed directory.

Generated by OpenCVE AI on August 17, 2026 at 16:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r28c-9q8g-f849 PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) leads to Arbitrary .map File Disclosure
History

Mon, 17 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 17 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Postcss
Postcss postcss
Vendors & Products Postcss
Postcss postcss

Mon, 17 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
Description PostCSS takes a CSS file and provides an API to analyze and modify its rules by transforming the rules into an Abstract Syntax Tree. Prior to 8.5.18, lib/previous-map.js loadMap() passes attacker-controlled sourceMappingURL values to join(dirname(opts.from), annotation), and loadFile() permits traversed or absolute .map paths, allowing untrusted CSS processed without map: false to disclose sourcesContent from arbitrary reachable .map files through result.map. This issue is fixed in version 8.5.18.
Title PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) leads to Arbitrary .map File Disclosure
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-17T16:36:37.422Z

Reserved: 2026-08-13T14:04:09.604Z

Link: CVE-2026-73646

cve-icon Vulnrichment

Updated: 2026-08-17T16:36:25.466Z

cve-icon NVD

Status : Received

Published: 2026-08-17T16:17:47.257

Modified: 2026-08-17T17:16:51.660

Link: CVE-2026-73646

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-17T16:30:06Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')