Every CVE Search/ Get API key

CVE-2026-73653

Vitest: Browser Mode provider commands bypass the file-access permission gate

9.4 CriticalFix available

Vitest is a testing framework powered by Vite. Prior to versions 3.2.7, 4.1.10, and 5.0.0-beta.6, Browser Mode provider commands including upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces accept browser-supplied file paths without enforcing the allowWrite permission gate or confining paths to the project root. A client that can reach the Browser Mode API can read arbitrary local files, create or overwrite image and trace files, or delete files accessible to the Vitest process even when allowWrite is false. This issue is fixed in versions 3.2.7, 4.1.10, and 5.0.0-beta.6.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
Low

Exploit likelihood

0.79%Up 0.1 points since Aug 14, 2026
90%50%10%1%

What each source reports

CVE List Score used 9.4

Vitest: Browser Mode provider commands bypass the file-access permission gate

Vitest is a testing framework powered by Vite. Prior to versions 3.2.7, 4.1.10, and 5.0.0-beta.6, Browser Mode provider commands including upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces accept browser-supplied file paths without enforcing the allowWrite permission gate or confining paths to the project root. A client that can reach the Browser Mode API can read arbitrary local files, create or overwrite image and trace files, or delete files accessible to the Vitest process even when allowWrite is false. This issue is fixed in versions 3.2.7, 4.1.10, and 5.0.0-beta.6.

Record
CVE-2026-73653
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Weakness
CWE-22, CWE-552, CWE-862
Updated
2026-11-02
EUVDEUVD-2026-58197 9.4

Vitest is a testing framework powered by Vite. Prior to versions 3.2.7, 4.1.10, and 5.0.0-beta.6, Browser Mode provider commands including upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces accept browser-supplied file paths without enforcing the allowWrite permission gate or confining paths to the project root. A client that can reach the Browser Mode API can read arbitrary local files, create or overwrite image and trace files, or delete files accessible to the Vitest process even when allowWrite is false. This issue is fixed in versions 3.2.7, 4.1.10, and 5.0.0-beta.6.

Record
EUVD-2026-58197
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Updated
2026-11-02
GitHub AdvisoriesGHSA-p63j-vcc4-9vmv 9.4

@vitest/browser: Browser Mode provider commands bypass the file-access permission gate

Summary

Browser Mode exposes a set of built-in "commands" that run on the Node.js side of the test runner and can touch the local filesystem (taking screenshots, managing Playwright traces, uploading files for <input type="file">, comparing screenshots).

Several of these commands accept a file path from the browser and act on it without checking the allowWrite permission gate and without confining the path to the project directory. A client that can reach the Browser Mode API can therefore read, create, overwrite, or delete files anywhere the Vitest process can access, even when allowWrite is false.

This matters most when the Browser Mode API is exposed to the network (for example test.api.host is set, or the dev server is reachable from another machine or origin). In that configuration allowWrite defaults to false precisely to block file access, and these commands bypass that protection. On a default localhost-only setup with trusted test code, there is no untrusted party in a position to exploit it. The gap still matters wherever you rely on allowWrite: false to contain untrusted test code, because these commands ignore that flag.

Affected commands and impact

| Command | Operation | Impact | |---|---|---| | upload (Playwright + WebdriverIO) | Read | Arbitrary local file read; contents are loaded into the page and readable by test code. Highest-impact case. | | takeScreenshot (Playwright + WebdriverIO) | Write | Writes a PNG to an arbitrary path (absolute path used verbatim), creating parent directories. | | screenshotMatcher | Write | Writes reference/diff PNGs; directory derived from client path allows partial traversal. | | stopChunkTrace | Write | Writes a Playwright trace .zip to a path escapable via ../ in the trace name. | | deleteTracing | Delete | Deletes arbitrary files by path. | | annotateTraces | Read (disclosure) | Records a client-controlled attachment path that the reporter copies into the attachments directory, disclosing file contents. |

The writes do not let an attacker choose the file contents (they produce PNG images or trace archives), so the integrity impact is creating, overwriting, or deleting a file at an arbitrary path rather than writing a chosen payload. The reads (upload, annotateTraces) are more serious because they expose the full contents of an arbitrary file.

The fix adds, to every file-touching provider command, an allowWrite check for write/delete operations and path confinement to the project root (matching the existing fs command pattern), so client-supplied absolute paths and ../ traversal are rejected.

Record
GHSA-p63j-vcc4-9vmv
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Weakness
CWE-22, CWE-552, CWE-862
Updated
2026-11-02
NVD 9.4

Vitest is a testing framework powered by Vite. Prior to versions 3.2.7, 4.1.10, and 5.0.0-beta.6, Browser Mode provider commands including upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces accept browser-supplied file paths without enforcing the allowWrite permission gate or confining paths to the project root. A client that can reach the Browser Mode API can read arbitrary local files, create or overwrite image and trace files, or delete files accessible to the Vitest process even when allowWrite is false. This issue is fixed in versions 3.2.7, 4.1.10, and 5.0.0-beta.6.

Record
CVE-2026-73653
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Weakness
CWE-22, CWE-552, CWE-862
Updated
2026-11-02
OSV 9.4

Vitest: Browser Mode provider commands bypass the file-access permission gate

Vitest is a testing framework powered by Vite. Prior to versions 3.2.7, 4.1.10, and 5.0.0-beta.6, Browser Mode provider commands including upload, takeScreenshot, screenshotMatcher, stopChunkTrace, deleteTracing, and annotateTraces accept browser-supplied file paths without enforcing the allowWrite permission gate or confining paths to the project root. A client that can reach the Browser Mode API can read arbitrary local files, create or overwrite image and trace files, or delete files accessible to the Vitest process even when allowWrite is false. This issue is fixed in versions 3.2.7, 4.1.10, and 5.0.0-beta.6.

Record
CVE-2026-73653
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Weakness
CWE-22, CWE-552, CWE-862
Updated
2026-11-02
OSVGHSA-p63j-vcc4-9vmv 9.4

@vitest/browser: Browser Mode provider commands bypass the file-access permission gate

Summary

Browser Mode exposes a set of built-in "commands" that run on the Node.js side of the test runner and can touch the local filesystem (taking screenshots, managing Playwright traces, uploading files for <input type="file">, comparing screenshots).

Several of these commands accept a file path from the browser and act on it without checking the allowWrite permission gate and without confining the path to the project directory. A client that can reach the Browser Mode API can therefore read, create, overwrite, or delete files anywhere the Vitest process can access, even when allowWrite is false.

This matters most when the Browser Mode API is exposed to the network (for example test.api.host is set, or the dev server is reachable from another machine or origin). In that configuration allowWrite defaults to false precisely to block file access, and these commands bypass that protection. On a default localhost-only setup with trusted test code, there is no untrusted party in a position to exploit it. The gap still matters wherever you rely on allowWrite: false to contain untrusted test code, because these commands ignore that flag.

Affected commands and impact

| Command | Operation | Impact | |---|---|---| | upload (Playwright + WebdriverIO) | Read | Arbitrary local file read; contents are loaded into the page and readable by test code. Highest-impact case. | | takeScreenshot (Playwright + WebdriverIO) | Write | Writes a PNG to an arbitrary path (absolute path used verbatim), creating parent directories. | | screenshotMatcher | Write | Writes reference/diff PNGs; directory derived from client path allows partial traversal. | | stopChunkTrace | Write | Writes a Playwright trace .zip to a path escapable via ../ in the trace name. | | deleteTracing | Delete | Deletes arbitrary files by path. | | annotateTraces | Read (disclosure) | Records a client-controlled attachment path that the reporter copies into the attachments directory, disclosing file contents. |

The writes do not let an attacker choose the file contents (they produce PNG images or trace archives), so the integrity impact is creating, overwriting, or deleting a file at an arbitrary path rather than writing a chosen payload. The reads (upload, annotateTraces) are more serious because they expose the full contents of an arbitrary file.

The fix adds, to every file-touching provider command, an allowWrite check for write/delete operations and path confinement to the project root (matching the existing fs command pattern), so client-supplied absolute paths and ../ traversal are rejected.

Record
GHSA-p63j-vcc4-9vmv
CVSS 3.1
9.4 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
Weakness
CWE-22, CWE-552, CWE-862
Updated
2026-11-02
Show 26 moreShow less
OSVCLSA-2026-1790162728 No score

TuxCare security update for vitest (1 CVE)

TuxCare rebuilt vitest to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1790162728
Updated
2026-11-02
OSVCLSA-2026-1792160955 No score

TuxCare security update for @vitest/pretty-format (2 CVEs)

TuxCare rebuilt @vitest/pretty-format to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792160955
Updated
2026-11-02
OSVCLSA-2026-1792160965 No score

TuxCare security update for @vitest/web-worker (1 CVE)

TuxCare rebuilt @vitest/web-worker to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792160965
Updated
2026-11-02
OSVCLSA-2026-1792161474 No score

TuxCare security update for @vitest/snapshot (2 CVEs)

TuxCare rebuilt @vitest/snapshot to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161474
Updated
2026-11-02
OSVCLSA-2026-1792161476 No score

TuxCare security update for @vitest/snapshot (1 CVE)

TuxCare rebuilt @vitest/snapshot to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161476
Updated
2026-11-02
OSVCLSA-2026-1792161576 No score

TuxCare security update for @vitest/browser (1 CVE)

TuxCare rebuilt @vitest/browser to address 1 CVE. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161576
Updated
2026-11-02
OSVCLSA-2026-1792161578 No score

TuxCare security update for @vitest/browser (1 CVE)

TuxCare rebuilt @vitest/browser to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161578
Updated
2026-11-02
OSVCLSA-2026-1792161609 No score

TuxCare security update for @vitest/browser-playwright (2 CVEs)

TuxCare rebuilt @vitest/browser-playwright to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161609
Updated
2026-11-02
OSVCLSA-2026-1792161648 No score

TuxCare security update for @vitest/browser-preview (2 CVEs)

TuxCare rebuilt @vitest/browser-preview to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161648
Updated
2026-11-02
OSVCLSA-2026-1792161651 No score

TuxCare security update for @vitest/coverage-istanbul (1 CVE)

TuxCare rebuilt @vitest/coverage-istanbul to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161651
Updated
2026-11-02
OSVCLSA-2026-1792161664 No score

TuxCare security update for @vitest/coverage-v8 (1 CVE)

TuxCare rebuilt @vitest/coverage-v8 to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161664
Updated
2026-11-02
OSVCLSA-2026-1792161721 No score

TuxCare security update for @vitest/expect (2 CVEs)

TuxCare rebuilt @vitest/expect to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161721
Updated
2026-11-02
OSVCLSA-2026-1792161723 No score

TuxCare security update for @vitest/expect (1 CVE)

TuxCare rebuilt @vitest/expect to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161723
Updated
2026-11-02
OSVCLSA-2026-1792161767 No score

TuxCare security update for @vitest/mocker (2 CVEs)

TuxCare rebuilt @vitest/mocker to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161767
Updated
2026-11-02
OSVCLSA-2026-1792161770 No score

TuxCare security update for @vitest/mocker (1 CVE)

TuxCare rebuilt @vitest/mocker to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161770
Updated
2026-11-02
OSVCLSA-2026-1792161833 No score

TuxCare security update for @vitest/pretty-format (1 CVE)

TuxCare rebuilt @vitest/pretty-format to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161833
Updated
2026-11-02
OSVCLSA-2026-1792161877 No score

TuxCare security update for @vitest/spy (2 CVEs)

TuxCare rebuilt @vitest/spy to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161877
Updated
2026-11-02
OSVCLSA-2026-1792161879 No score

TuxCare security update for @vitest/spy (1 CVE)

TuxCare rebuilt @vitest/spy to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161879
Updated
2026-11-02
OSVCLSA-2026-1792161944 No score

TuxCare security update for @vitest/ui (1 CVE)

TuxCare rebuilt @vitest/ui to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161944
Updated
2026-11-02
OSVCLSA-2026-1792161976 No score

TuxCare security update for @vitest/utils (2 CVEs)

TuxCare rebuilt @vitest/utils to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792161976
Updated
2026-11-02
OSVCLSA-2026-1792161978 No score

TuxCare security update for @vitest/utils (1 CVE)

TuxCare rebuilt @vitest/utils to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792161978
Updated
2026-11-02
OSVCLSA-2026-1792162035 No score

TuxCare security update for @vitest/runner (2 CVEs)

TuxCare rebuilt @vitest/runner to address 2 CVEs. Fixed in 4.0.18-tuxcare.3.

Record
CLSA-2026-1792162035
Updated
2026-11-02
OSVCLSA-2026-1792162038 No score

TuxCare security update for @vitest/runner (1 CVE)

TuxCare rebuilt @vitest/runner to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792162038
Updated
2026-11-02
OSVCLSA-2026-1792162062 No score

TuxCare security update for @vitest/ws-client (1 CVE)

TuxCare rebuilt @vitest/ws-client to address 1 CVE. Fixed in 3.2.4-tuxcare.3.

Record
CLSA-2026-1792162062
Updated
2026-11-02
OSVCLSA-2026-1792450983 No score

TuxCare security update for vitest (3 CVEs)

TuxCare rebuilt vitest to address 3 CVEs. Fixed in 2.1.9-tuxcare.1.

Record
CLSA-2026-1792450983
Updated
2026-11-02
OSVCLSA-2026-1793093026 No score

TuxCare security update for vitest (4 CVEs)

TuxCare rebuilt vitest to address 4 CVEs. Fixed in 2.0.5-tuxcare.1.

Record
CLSA-2026-1793093026
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
@vitest/browser
npm
4.0.0 up to 4.1.10
4.1.10
@vitest/browser
npm
before 3.2.7
3.2.7
@vitest/browser
npm
5.0.0-beta.1 up to 5.0.0-beta.6
5.0.0-beta.6
vitest
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/pretty-format
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/web-worker
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/snapshot
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/snapshot
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/browser
TuxCare:npm
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/browser
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
Show 19 moreShow less
Affected packages
PackageAffectedFixed
@vitest/browser-playwright
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/browser-preview
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/coverage-istanbul
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/coverage-v8
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/expect
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/expect
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/mocker
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/mocker
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/pretty-format
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/spy
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/spy
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/ui
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/utils
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/utils
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/runner
TuxCare:npm
From an advisory covering 2 CVEs
4.0.18-tuxcare.0 up to 4.0.18-tuxcare.3, plus listed versions
4.0.184.0.18-tuxcare.14.0.18-tuxcare.2
4.0.18-tuxcare.3
@vitest/runner
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
@vitest/ws-client
TuxCare:npm
3.2.4-tuxcare.0 up to 3.2.4-tuxcare.3, plus listed versions
3.2.43.2.4-tuxcare.13.2.4-tuxcare.2
3.2.4-tuxcare.3
vitest
TuxCare:npm
From an advisory covering 3 CVEs
2.1.9-tuxcare.0 up to 2.1.9-tuxcare.1, plus listed versions
2.1.9
2.1.9-tuxcare.1
vitest
TuxCare:npm
From an advisory covering 4 CVEs
2.0.5-tuxcare.0 up to 2.0.5-tuxcare.1, plus listed versions
2.0.5
2.0.5-tuxcare.1

History

History
RecordedChangedSources
affected, facts
affected, aliasesOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-73653 is a critical vulnerability (CVSS 9.4) in Vitest-dev Vitest, published July 21, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.79%, the 56th percentile. Fixed in @vitest/browser 4.1.10.

References

Show 8 moreShow less
MoveEnter Open