{"description":"Trending threats, MITRE ATT\u0026CK coverage, and detection metadata. Fed continuously.","feed_url":"https://feed.craftedsignal.io/products/@vitest/browser--5.0.0-beta.1--5.0.0-beta.6/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/browser (\u003e= 4.0.0, \u003c 4.1.10)","@vitest/browser (\u003c 3.2.7)","@vitest/browser (\u003e= 5.0.0-beta.1, \u003c 5.0.0-beta.6)"],"_cs_severities":["critical"],"_cs_tags":["supply-chain","vulnerability","file-access","RCE","web-dev"],"_cs_type":"advisory","_cs_vendors":["Vitest"],"content_html":"\u003cp\u003eA critical vulnerability (GHSA-p63j-vcc4-9vmv) in the \u003ccode\u003e@vitest/browser\u003c/code\u003e package, affecting versions prior to \u003ccode\u003e3.2.7\u003c/code\u003e, between \u003ccode\u003e4.0.0\u003c/code\u003e and \u003ccode\u003e4.1.10\u003c/code\u003e, and between \u003ccode\u003e5.0.0-beta.1\u003c/code\u003e and \u003ccode\u003e5.0.0-beta.6\u003c/code\u003e, has been identified. This flaw allows an attacker to bypass the \u003ccode\u003eallowWrite\u003c/code\u003e permission gate and path confinement mechanisms within Vitest's Browser Mode. The Browser Mode exposes built-in commands that interact with the local filesystem, such as \u003ccode\u003eupload\u003c/code\u003e, \u003ccode\u003etakeScreenshot\u003c/code\u003e, \u003ccode\u003escreenshotMatcher\u003c/code\u003e, \u003ccode\u003estopChunkTrace\u003c/code\u003e, \u003ccode\u003edeleteTracing\u003c/code\u003e, and \u003ccode\u003eannotateTraces\u003c/code\u003e. These commands accept file paths from the browser without validating the \u003ccode\u003eallowWrite\u003c/code\u003e setting or confining paths to the project directory. Consequently, if the Browser Mode API is network-exposed (e.g., \u003ccode\u003etest.api.host\u003c/code\u003e is set, or the dev server is reachable remotely), a client can exploit this to read, create, overwrite, or delete files on the system where Vitest is running, even when \u003ccode\u003eallowWrite\u003c/code\u003e is explicitly set to \u003ccode\u003efalse\u003c/code\u003e. While the writes are limited to specific content types (PNG, zip archives), the arbitrary file read capability poses a significant risk of sensitive data exfiltration.\u003c/p\u003e\n\u003ch2 id=\"attack-chain\"\u003eAttack Chain\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003e\u003cstrong\u003eInitial Access\u003c/strong\u003e: The attacker gains network access to the Vitest Browser Mode API, typically by exploiting a misconfigured \u003ccode\u003etest.api.host\u003c/code\u003e or a publicly exposed development server.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eAPI Interaction\u003c/strong\u003e: The attacker sends a crafted request to a vulnerable Browser Mode command (e.g., \u003ccode\u003eupload\u003c/code\u003e, \u003ccode\u003etakeScreenshot\u003c/code\u003e, \u003ccode\u003edeleteTracing\u003c/code\u003e).\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ePath Traversal/Absolute Path Injection\u003c/strong\u003e: The attacker includes an absolute path or path traversal sequences (e.g., \u003ccode\u003e../\u003c/code\u003e) in the file path parameter of the command.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ePermission Bypass\u003c/strong\u003e: The vulnerable command processes the client-supplied path without checking the \u003ccode\u003eallowWrite\u003c/code\u003e permission gate.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eArbitrary File Operation\u003c/strong\u003e: Depending on the command used, the Vitest process performs an operation on the specified arbitrary file path.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ccode\u003eupload\u003c/code\u003e or \u003ccode\u003eannotateTraces\u003c/code\u003e: Reads the contents of an arbitrary local file and discloses them to the attacker.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003etakeScreenshot\u003c/code\u003e, \u003ccode\u003escreenshotMatcher\u003c/code\u003e, \u003ccode\u003estopChunkTrace\u003c/code\u003e: Creates or overwrites files (e.g., PNGs, .zip archives) at arbitrary locations.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003edeleteTracing\u003c/code\u003e: Deletes arbitrary files by path.\u003c/li\u003e\n\u003c/ul\u003e\n\u003col start=\"6\"\u003e\n\u003cli\u003e\u003cstrong\u003eImpact\u003c/strong\u003e: The attacker achieves arbitrary file read/write/delete capabilities, leading to data exfiltration, system manipulation, or denial of service.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2 id=\"impact\"\u003eImpact\u003c/h2\u003e\n\u003cp\u003eThe vulnerability allows an attacker with network access to the Vitest Browser Mode API to perform arbitrary file system operations on the host running the Vitest process. This can lead to severe consequences, including the exfiltration of sensitive data from any accessible file (e.g., configuration files, private keys, source code) via commands like \u003ccode\u003eupload\u003c/code\u003e or \u003ccode\u003eannotateTraces\u003c/code\u003e. Attackers can also compromise system integrity by creating, overwriting, or deleting critical files using commands such as \u003ccode\u003etakeScreenshot\u003c/code\u003e or \u003ccode\u003edeleteTracing\u003c/code\u003e. While writes are limited to specific file types (PNGs, zip archives), the ability to delete arbitrary files or overwrite existing ones with attacker-controlled, albeit type-restricted, content could lead to a denial of service or further system compromise. The severity is particularly high if the Vitest environment has elevated privileges or contains sensitive data.\u003c/p\u003e\n\u003ch2 id=\"recommendation\"\u003eRecommendation\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cstrong\u003ePatch Vulnerable Vitest Installations\u003c/strong\u003e: Immediately update \u003ccode\u003e@vitest/browser\u003c/code\u003e to a fixed version: \u003ccode\u003e\u0026gt;= 3.2.7\u003c/code\u003e, \u003ccode\u003e\u0026gt;= 4.1.10\u003c/code\u003e, or \u003ccode\u003e\u0026gt;= 5.0.0-beta.6\u003c/code\u003e.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eNetwork Segmentation\u003c/strong\u003e: Ensure that the Vitest Browser Mode API (\u003ccode\u003etest.api.host\u003c/code\u003e) is not exposed to untrusted networks or the internet. Restrict network access to only trusted development environments.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003ePrinciple of Least Privilege\u003c/strong\u003e: Run Vitest processes with the minimum necessary file system permissions to limit the blast radius of any potential exploitation.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eMonitor for Anomalous File Activity\u003c/strong\u003e: Implement logging and monitoring for unusual file read, write, or delete operations originating from Vitest processes that exceed expected behavior.\u003c/li\u003e\n\u003c/ul\u003e\n","date_modified":"2026-07-21T19:38:12Z","date_published":"2026-07-21T19:38:12Z","id":"https://feed.craftedsignal.io/briefs/2026-07-vitest-browser-file-access-bypass/","summary":"A critical vulnerability in `@vitest/browser`'s Browser Mode allows arbitrary file system access due to a bypass of the `allowWrite` permission gate and lack of path confinement, enabling an attacker to read, create, overwrite, or delete files on the local filesystem where the Vitest process is running.","title":"@vitest/browser File Access Bypass Vulnerability (GHSA-p63j-vcc4-9vmv)","url":"https://feed.craftedsignal.io/briefs/2026-07-vitest-browser-file-access-bypass/"}],"language":"en","title":"CraftedSignal Threat Feed - @Vitest/Browser (\u003e= 5.0.0-Beta.1, \u003c 5.0.0-Beta.6)","version":"https://jsonfeed.org/version/1.1"}