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. In versions 8.5.11 and prior, the 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.). This issue has been fixed in version 8.5.12.
Published: 2026-07-27
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

PostCSS version 8.5.11 and earlier allow an attacker who controls CSS input to embed a sourceMappingURL comment that is parsed and dereferenced against the local file system without validation. The resulting syntax error leaks the first ten bytes of the target file, providing both an information disclosure and a file‑existence oracle. This weakness is classified as CWE‑200 and CWE‑22.

Affected Systems

The vulnerability affects the PostCSS library from the postcss:postcss vendor, specifically all releases 8.5.11 and older. The flaw was introduced before 8.5.12 and was fixed in that release.

Risk and Exploitability

With a CVSS score of 7.5 the vulnerability is considered high severity, and the EPSS score is < 1%, indicating a very low but non‑zero probability of exploitation. It is not listed in the CISA KEV catalog. An attacker can exploit the flaw by supplying crafted CSS to any pipeline that uses PostCSS with default options, such as CMS theme rendering, user‑style processors, or build systems. The lack of input validation and file‑system checks makes the attack straightforward for an attacker with access to supply CSS, and the resulting read primitive could be combined with large files to trigger a denial‑of‑service.

Generated by OpenCVE AI on August 3, 2026 at 17:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade PostCSS to 8.5.12 or later, which removes the unsafe sourceMappingURL parsing logic.
  • Validate and sanitize all CSS input before passing it to PostCSS, ensuring that no sourceMappingURL comment containing arbitrary paths is accepted.
  • Restrict the file system permissions of the Node process or run PostCSS in a sandboxed environment to limit its ability to read arbitrary files if an immediate upgrade is not possible.

Generated by OpenCVE AI on August 3, 2026 at 17:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6g55-p6wh-862q PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments
History

Wed, 29 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Mon, 27 Jul 2026 23:30:00 +0000

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

Mon, 27 Jul 2026 20:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Mon, 27 Jul 2026 17: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. In versions 8.5.11 and prior, the 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.). This issue has been fixed in version 8.5.12.
Title PostCSS: Arbitrary file read and information disclosure via attacker-controlled sourceMappingURL in CSS comments
Weaknesses CWE-200
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-07-27T17:44:31.606Z

Reserved: 2026-05-12T20:31:43.449Z

Link: CVE-2026-45623

cve-icon Vulnrichment

Updated: 2026-07-27T17:44:27.550Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-27T18:16:55.130

Modified: 2026-08-07T00:13:41.957

Link: CVE-2026-45623

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-27T17:23:13Z

Links: CVE-2026-45623 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T17:15:12Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-22

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