<?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>Cve-2026-45623 - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/cve-2026-45623/</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>Thu, 23 Jul 2026 15:10:37 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/cve-2026-45623/feed.xml" rel="self" type="application/rss+xml"/><item><title>PostCSS: Arbitrary File Read and Information Disclosure via sourceMappingURL</title><link>https://feed.craftedsignal.io/briefs/2026-07-postcss-file-read/</link><pubDate>Thu, 23 Jul 2026 15:10:37 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-postcss-file-read/</guid><description>A high-severity vulnerability (CVE-2026-45623) in PostCSS's `PreviousMap` component allows attackers to perform arbitrary file reads and information disclosure from the local filesystem by injecting malicious `sourceMappingURL` comments into untrusted CSS input, leading to sensitive data leakage and denial of service.</description><content:encoded><![CDATA[<p>A critical vulnerability, tracked as CVE-2026-45623, has been identified in PostCSS, a widely used CSS processing tool. The vulnerability resides within the <code>PreviousMap</code> component, specifically affecting versions up to 8.5.11. Attackers can exploit this by embedding specially crafted <code>/*# sourceMappingURL=PATH */</code> comments into CSS input that is subsequently processed by <code>postcss().process()</code>. The <code>PreviousMap</code> component dereferences the <code>PATH</code> value against the local filesystem without proper sanitization, allowing for arbitrary file reads, including files like <code>/etc/passwd</code> or sensitive environment configuration. This can lead to the disclosure of the first approximately 10 bytes of targeted files through <code>JSON.parse</code> <code>SyntaxError</code> messages, a file-existence oracle, and potential denial of service by reading large or special device files. The flaw is triggered with PostCSS's default options, making any application that processes untrusted CSS vulnerable, including CMS themes, user-uploaded styles, and various build pipelines.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious CSS string containing a <code>/*# sourceMappingURL=PATH */</code> comment, where <code>PATH</code> specifies an arbitrary file on the target system (e.g., <code>/etc/passwd</code>).</li>
<li>The malicious CSS input is provided to a system that processes it using PostCSS's <code>process()</code> function, often within web applications, build tools, or user content rendering engines.</li>
<li>PostCSS's <code>Input</code> constructor (within <code>lib/input.js</code>) is instantiated and, during its initialization, it attempts to load a source map using the <code>PreviousMap</code> component.</li>
<li>The <code>PreviousMap</code> constructor calls <code>loadAnnotation</code> to extract the <code>PATH</code> from the CSS comment without any sanitization or validation of the provided URL.</li>
<li>Subsequently, <code>loadMap</code> is invoked. If <code>opts.from</code> is unset, the raw attacker-supplied absolute path is used. If <code>opts.from</code> is set, <code>path.join</code> is used, which does not block <code>..</code> segments, enabling path traversal to arbitrary locations like <code>../../../../../etc/passwd</code>.</li>
<li>The <code>loadFile</code> function is called with the attacker-controlled or traversed file path, which then performs a synchronous file read using <code>readFileSync(path, 'utf-8')</code>.</li>
<li>The read file content is then processed. If the content is not valid JSON (which is typical for files like <code>/etc/passwd</code>), <code>SourceMapConsumer</code> attempts to call <code>JSON.parse</code>, resulting in a <code>SyntaxError</code>.</li>
<li>The <code>SyntaxError</code> message, which includes the first ~10 bytes of the file content (e.g., &quot;Unexpected token 'r', &quot;root:x:0:0&quot;...&quot;), is propagated back to the application, disclosing sensitive information to the attacker.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The vulnerability allows for an arbitrary file read of any file accessible by the Node.js process, impacting the confidentiality of sensitive data across a wide range of applications. The initial ~10 bytes leaked from the targeted file through the <code>JSON.parse</code> <code>SyntaxError</code> message are often sufficient to reveal critical information, such as SSH key headers, prefixes of API keys (<code>API_KEY=sk...</code>), <code>/etc/passwd</code> entries, or parts of process environment variables (<code>/proc/self/environ</code>). This information can be used for further exploitation. Additionally, the flaw provides a file-existence oracle, enabling attackers to map out filesystem structures and confirm the presence of specific files or configurations. A denial of service (DoS) can also be achieved by directing <code>readFileSync</code> to large files or special device files like <code>/dev/zero</code>, potentially stalling or crashing the application. Given PostCSS's extensive use in web development ecosystems, this vulnerability poses a significant risk to any system processing untrusted CSS.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li><strong>Patch <code>npm/postcss</code> immediately</strong> to a version greater than 8.5.11 to mitigate CVE-2026-45623.</li>
<li><strong>Audit application logging and error handling</strong> to ensure that PostCSS error messages (specifically <code>SyntaxError</code> messages resulting from <code>JSON.parse</code>) are not exposed to untrusted users. These errors can contain fragments of sensitive file contents.</li>
<li><strong>Implement input validation and sanitization</strong> for all CSS input processed by PostCSS, especially in environments where user-supplied or untrusted CSS is handled. Block or strip <code>/*# sourceMappingURL=</code> comments from untrusted sources if possible.</li>
<li><strong>Configure PostCSS with <code>{ map: false }</code></strong> in scenarios where previous source map handling is not required, as this explicitly disables the vulnerable functionality and is the only full short-circuit for the bug.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>file-read</category><category>information-disclosure</category><category>supply-chain</category><category>nodejs</category><category>web-application</category><category>vulnerability</category><category>cve-2026-45623</category></item></channel></rss>