{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/tags/cve-2026-47429/feed.json","home_page_url":"https://feed.craftedsignal.io/","items":[{"_cs_actors":[],"_cs_cpes":[],"_cs_cves":[],"_cs_exploited":false,"_cs_has_poc":false,"_cs_poc_references":[],"_cs_products":["vitest (\u003c 4.1.0)"],"_cs_severities":["critical"],"_cs_tags":["arbitrary-file-read","code-execution","vitest","cve-2026-47429"],"_cs_type":"threat","_cs_vendors":["Vitest"],"content_html":"\u003cp\u003eA 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 \u003ccode\u003eisFileServingAllowed\u003c/code\u003e function within the \u003ccode\u003e/__vitest_attachment__\u003c/code\u003e API handler. By using the \u003ccode\u003e\\\\?\\\\..\\\\\u003c/code\u003e 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\u0026rsquo;s rerun and file write capabilities. To mitigate this, Vitest now includes \u003ccode\u003eallowWrite\u003c/code\u003e and \u003ccode\u003eallowExec\u003c/code\u003e configuration flags, which are disabled by default when the API server is bound to a non-localhost host.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eAttacker identifies a vulnerable Vitest instance with its UI server exposed to the network, running on a Windows system.\u003c/li\u003e\n\u003cli\u003eAttacker obtains the API token by sending a request to \u003ccode\u003ehttp://localhost:51204/__vitest__/\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eAttacker crafts a malicious request to the \u003ccode\u003e/__vitest_attachment__\u003c/code\u003e endpoint with a path traversal payload: \u003ccode\u003ehttp://localhost:51204/__vitest_attachment__?path=C:\\\\path\\\\to\\\\project\\\\?\\\\..\\\\..\\\\secret.txt\u0026amp;contentType=text/plain\u0026amp;token=$TOKEN\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003eThe \u003ccode\u003eisFileServingAllowed\u003c/code\u003e check is bypassed due to the use of the \u003ccode\u003e\\\\?\\\\..\\\\\u003c/code\u003e sequence.\u003c/li\u003e\n\u003cli\u003eThe Vitest server reads the content of the specified file (\u003ccode\u003esecret.txt\u003c/code\u003e) outside the intended project directory.\u003c/li\u003e\n\u003cli\u003eThe attacker receives the content of the file in the response.\u003c/li\u003e\n\u003cli\u003eAttacker leverages the API\u0026rsquo;s rerun feature and file write feature (\u003ccode\u003esaveTestFile\u003c/code\u003e) to write a malicious test file containing arbitrary code.\u003c/li\u003e\n\u003cli\u003eAttacker uses the rerun feature to execute the newly created test file, achieving arbitrary script execution.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eSuccessful 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\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eUpgrade Vitest to version 4.1.0 or later to patch CVE-2026-47429.\u003c/li\u003e\n\u003cli\u003eEnsure that the \u003ccode\u003eallowWrite\u003c/code\u003e and \u003ccode\u003eallowExec\u003c/code\u003e configuration flags are disabled when the Vitest API server is bound to a non-localhost host as per the vendor mitigations.\u003c/li\u003e\n\u003cli\u003eMonitor network traffic for suspicious requests to the \u003ccode\u003e/__vitest_attachment__\u003c/code\u003e endpoint with path traversal sequences using the Sigma rule provided below.\u003c/li\u003e\n\u003cli\u003eMonitor process creation for unexpected script execution originating from the Vitest process using the provided Sigma rule.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-06-01T14:15:03Z","date_published":"2026-06-01T14:15:03Z","id":"https://feed.craftedsignal.io/briefs/2026-06-vitest-file-read/","summary":"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.","title":"Vitest Arbitrary File Read Vulnerability","url":"https://feed.craftedsignal.io/briefs/2026-06-vitest-file-read/"}],"language":"en","title":"CraftedSignal Threat Feed — Cve-2026-47429","version":"https://jsonfeed.org/version/1.1"}