<?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-47429 — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/cve-2026-47429/</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>Mon, 01 Jun 2026 14:15:03 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/cve-2026-47429/feed.xml" rel="self" type="application/rss+xml"/><item><title>Vitest Arbitrary File Read Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-06-vitest-file-read/</link><pubDate>Mon, 01 Jun 2026 14:15:03 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-06-vitest-file-read/</guid><description>An arbitrary file read vulnerability exists in Vitest when the UI server is listening, especially when exposed to the network, allowing an attacker to read arbitrary files outside the project directory and potentially execute arbitrary scripts.</description><content:encoded><![CDATA[<p>A critical vulnerability exists in Vitest versions prior to 4.1.0 that allows arbitrary file reads on Windows systems when the Vitest UI server is active, particularly if exposed to the network. The flaw stems from the incorrect usage of the deprecated <code>isFileServingAllowed</code> function within the <code>/__vitest_attachment__</code> API handler. By using the <code>\\?\\..\\</code> path traversal technique, attackers can bypass intended security checks and access files outside the project directory. This vulnerability, identified as CVE-2026-47429, could also lead to arbitrary script execution due to the API&rsquo;s rerun and file write capabilities. To mitigate this, Vitest now includes <code>allowWrite</code> and <code>allowExec</code> configuration flags, which are disabled by default when the API server is bound to a non-localhost host.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a vulnerable Vitest instance with its UI server exposed to the network, running on a Windows system.</li>
<li>Attacker obtains the API token by sending a request to <code>http://localhost:51204/__vitest__/</code>.</li>
<li>Attacker crafts a malicious request to the <code>/__vitest_attachment__</code> endpoint with a path traversal payload: <code>http://localhost:51204/__vitest_attachment__?path=C:\\path\\to\\project\\?\\..\\..\\secret.txt&amp;contentType=text/plain&amp;token=$TOKEN</code>.</li>
<li>The <code>isFileServingAllowed</code> check is bypassed due to the use of the <code>\\?\\..\\</code> sequence.</li>
<li>The Vitest server reads the content of the specified file (<code>secret.txt</code>) outside the intended project directory.</li>
<li>The attacker receives the content of the file in the response.</li>
<li>Attacker leverages the API&rsquo;s rerun feature and file write feature (<code>saveTestFile</code>) to write a malicious test file containing arbitrary code.</li>
<li>Attacker uses the rerun feature to execute the newly created test file, achieving arbitrary script execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to read arbitrary files on the affected system. If the attacker is able to read sensitive files containing credentials or configuration data, it could lead to further compromise of the system or network. The ability to execute arbitrary scripts allows for full system compromise, data exfiltration, or denial-of-service attacks. This vulnerability affects any Vitest instances with UI server exposed to network and running on Windows prior to version 4.1.0</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade Vitest to version 4.1.0 or later to patch CVE-2026-47429.</li>
<li>Ensure that the <code>allowWrite</code> and <code>allowExec</code> configuration flags are disabled when the Vitest API server is bound to a non-localhost host as per the vendor mitigations.</li>
<li>Monitor network traffic for suspicious requests to the <code>/__vitest_attachment__</code> endpoint with path traversal sequences using the Sigma rule provided below.</li>
<li>Monitor process creation for unexpected script execution originating from the Vitest process using the provided Sigma rule.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">threat</category><category>arbitrary-file-read</category><category>code-execution</category><category>vitest</category><category>cve-2026-47429</category></item></channel></rss>