CVE-2026-73653: @vitest/browser · Browser Mode provider commands bypass the file-access permission gate
Affects @vitest/browserSource GCVE Database
Mentioned vulnerabilities
CVSS 9.4 Critical : upgrade to 5.0.0-beta.6 as a priority.
Data as of 26 Oct 2026, 16:10 UTC
- Patch
- Available – fixed in 5.0.0-beta.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:LWhat to do
Upgrade @vitest/browser to 5.0.0-beta.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npm@vitest/browser | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The planned fix adds allowWrite permission checks for write and delete operations and confines file paths to the project root, rejecting absolute paths and directory traversal. If you cannot patch yet, avoid exposing the Browser Mode API to untrusted networks or clients, and do not rely solely on allowWrite: false for security containment.
Description
A vulnerability in @vitest/browser's Browser Mode allows certain built-in commands to bypass the file-access permission gate. These commands can read, write, or delete files anywhere accessible by the Vitest process, ignoring the allowWrite flag and path confinement. This is particularly risky when the Browser Mode API is exposed beyond localhost, enabling arbitrary file read and modification by untrusted clients. The vulnerability affects versions >=4.0.0 <4.1.10 and <3.2.7. A fix is planned to enforce allowWrite checks and restrict paths to the project root.
References
- github.com/vitest-dev/vitest/security/advisories/GHSA-p63j-vcc4-9vmv (opens in a new tab)
- github.com/vitest-dev/vitest/pull/10674 (opens in a new tab)
- github.com/vitest-dev/vitest/pull/10679 (opens in a new tab)
- github.com/vitest-dev/vitest/pull/10680 (opens in a new tab)
- github.com/vitest-dev/vitest/commit/33f96a145ef09ca6a43b4e555eb273e64a87be23 (opens in a new tab)
- github.com/vitest-dev/vitest/commit/5c18dd267ff7f47f24cab2f615a16b37d90feb7f (opens in a new tab)
- github.com/vitest-dev/vitest/commit/b795e36b34969bec50b47a9f29d26f799a6a04fb (opens in a new tab)
- github.com/vitest-dev/vitest (opens in a new tab)
- github.com/vitest-dev/vitest/releases/tag/v3.2.7 (opens in a new tab)
- github.com/vitest-dev/vitest/releases/tag/v4.1.10 (opens in a new tab)
- github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.6 (opens in a new tab)