Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2026-73653 — @vitest/browser

CRITICALFix: vitest-dev/vitest@33f96a1

CVE-2026-73653 is a critical-severity (CVSS 9.4) Path Traversal vulnerability in @vitest/browser. A fix is available for @vitest/browser — see the affected versions and patch details below.

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

Also known asGHSA-p63j-vcc4-9vmv
Published
Aug 13, 2026
Updated
Sep 11, 2026
Affected
3 pkgs
Patched
3 / 3
Exploits
None indexed
Exploitation data as of Sep 27, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.
  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-73653.

EPSS Exploitation Probability

via FIRST.org ↗
0.8%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs54th percentile — riskier than 54% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-73653 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 380,066 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

3 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

34other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@vitest/browsernpm
13.2Mdownloads / week

Description

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

CommandOperationImpact
upload (Playwright + WebdriverIO)ReadArbitrary local file read; contents are loaded into the page and readable by test code. Highest-impact case.
takeScreenshot (Playwright + WebdriverIO)WriteWrites a PNG to an arbitrary path (absolute path used verbatim), creating parent directories.
screenshotMatcherWriteWrites reference/diff PNGs; directory derived from client path allows partial traversal.
stopChunkTraceWriteWrites a Playwright trace .zip to a path escapable via ../ in the trace name.
deleteTracingDeleteDeletes arbitrary files by path.
annotateTracesRead (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.

Affected Packages

3 total 3 fixed
EcosystemPackageVulnerable rangeFix
📦npm@vitest/browser≥ 4.0.0&&< 4.1.104.1.10npm install @vitest/browser@4.1.10
📦npm@vitest/browserall versions3.2.7npm install @vitest/browser@3.2.7
📦npm@vitest/browser≥ 5.0.0-beta.1&&< 5.0.0-beta.65.0.0-beta.6npm install @vitest/browser@5.0.0-beta.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @vitest/browser, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @vitest/browser to 4.1.10 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-73653 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatCritical
Workaround published by Red Hat
Making Browser Mode API unreachable outside of local machine by making it listen only on localhost.
Source: Red Hat security advisory for CVE-2026-73653 (CC BY 4.0)

Frequently Asked Questions

## 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 `allo
O3 Security · Impact-Aware SCA

Is CVE-2026-73653 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-73653: @vitest/browser (Critical 9.4) | O3 Security