Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Missing Authorization vulnerabilities in an interactive lesson.
Start learningUpgrade @vitest/ui to version 3.2.5, 4.1.0-beta.3 or higher.
@vitest/ui is an UI for Vitest
Affected versions of this package are vulnerable to Missing Authorization through the api and browser.api request handlers in the server and UI components. An attacker can run tests, modify project files, or overwrite snapshots by connecting to an exposed API/UI server and invoking the interactive actions that trigger file writes or test execution. When the API server is reachable from the network, the vulnerable code paths in the browser UI and browser command handlers allow write and exec operations without enforcing the intended restrictions, enabling a remote client to modify source files, save attachments, and launch test files on the host machine. This can corrupt the project workspace and execute attacker-controlled code within the Vitest process.