<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Postcss - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/postcss/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 24 Jul 2026 16:32:37 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/postcss/feed.xml" rel="self" type="application/rss+xml"/><item><title>PostCSS Path Traversal Vulnerability via Source Map Auto-Loading</title><link>https://feed.craftedsignal.io/briefs/2026-07-postcss-path-traversal-source-map/</link><pubDate>Fri, 24 Jul 2026 16:32:37 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-postcss-path-traversal-source-map/</guid><description>A path traversal vulnerability (GHSA-r28c-9q8g-f849) in PostCSS versions up to 8.5.17 allows an unauthenticated attacker to disclose arbitrary `.map` file contents from a vulnerable server by crafting a `sourceMappingURL` comment in user-submitted CSS, leading to sensitive information exposure if the processed output is returned.</description><content:encoded><![CDATA[<p>A significant path traversal vulnerability, identified as GHSA-r28c-9q8g-f849, has been discovered in PostCSS, a popular CSS processing tool, affecting versions up to 8.5.17. This flaw stems from the tool's default behavior of auto-detecting and attempting to load &quot;previous source maps&quot; specified in <code>/*# sourceMappingURL=... */</code> comments within CSS text. An attacker can manipulate these comments with directory traversal sequences (e.g., <code>../../../</code>) or absolute paths to bypass intended directory restrictions, coercing PostCSS into reading arbitrary <code>.map</code> files from the filesystem. If the application then returns the processed <code>result.map</code> (a common practice in build pipelines), the attacker can extract sensitive information contained within the <code>sourcesContent</code> field of these disclosed <code>.map</code> files. This vulnerability requires no authentication and can be triggered by submitting specially crafted CSS to any service that processes untrusted CSS with PostCSS without explicitly setting the <code>map: false</code> option.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies a service that accepts user-submitted CSS and processes it using PostCSS, leveraging its default <code>postcss().process()</code> behavior.</li>
<li>The attacker crafts a malicious CSS input containing a <code>/*# sourceMappingURL=../../../../some/other/app/dist/bundle.js.map */</code> comment.</li>
<li>The service invokes <code>postcss().process()</code> on the attacker's CSS, with the <code>map</code> option left at its default (true).</li>
<li>During processing, PostCSS's <code>loadMap()</code> function attempts to resolve the <code>sourceMappingURL</code> annotation.</li>
<li>The <code>path.join()</code> operation, combined with <code>loadFile()</code>, processes the traversal sequence, allowing access to <code>.map</code> files outside the intended directory.</li>
<li>PostCSS successfully reads the arbitrary <code>.map</code> file (e.g., <code>bundle.js.map</code>) from the server's filesystem.</li>
<li>The <code>sourcesContent</code> field from the read <code>.map</code> file, which often contains actual source code, is merged into the <code>result.map</code> object generated by PostCSS.</li>
<li>The vulnerable service, following typical build pipeline behavior, outputs or returns the <code>result.map</code> to the attacker, leading to the disclosure of sensitive file contents.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability leads to the disclosure of contents from arbitrary <code>.map</code> files accessible by the PostCSS process's privileges on the filesystem. The impact is significant as <code>.map</code> files frequently contain embedded source code and project structure information which, if exposed, can reveal intellectual property, internal logic, or aid in further attacks. Any application processing untrusted CSS without explicitly disabling source map generation (via <code>map: false</code>) is vulnerable. No authentication or user interaction beyond submitting the malicious CSS is required. The specific number of victims is unknown, but given PostCSS's widespread use in web development, a large number of applications could be at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade PostCSS to version 8.5.18 or later as soon as patches become available to remediate the path traversal vulnerability documented in GHSA-r28c-9q8g-f849.</li>
<li>For immediate mitigation or if upgrading is not feasible, configure any application processing untrusted CSS with PostCSS to explicitly set the <code>map: false</code> option in the <code>postcss().process()</code> call. This prevents PostCSS from attempting to load source maps and nullifies the exploitation vector described in this brief.</li>
<li>Review the application's handling of <code>result.map</code> to ensure that if source maps are legitimately generated, they are not inadvertently exposed to untrusted entities.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>information-disclosure</category><category>postcss</category><category>nodejs</category><category>ghsa</category></item></channel></rss>