Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-862.
Summary
Vitest is a testing framework powered by Vite. From 3.0.0 until 3.2.5, 4.1.8, and 5.0.0-beta.4, Vitest Browser Mode exposed a cdp() API that forwarded raw Chrome DevTools Protocol methods without being gated by allowWrite or allowExec, allowing a remote client with exposed browser API metadata to use CDP Page.setDownloadBehavior and Runtime.evaluate to overwrite vite.config.ts and execute attacker-controlled Node.js code. This issue is fixed in versions 3.2.5, 4.1.8, and 5.0.0-beta.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| vitest-dev | vitest | 3.0.0 to before 3.2.5; 4.0.0 to before 4.1.8; 5.0.0-beta.0 to before 5.0.0-beta.4 | 3.2.5, 4.1.8, 5.0.0-beta.4 | Patch available | CNA |
| — | @vitest/browser (npm) | 5.0.0-beta.0 to before 5.0.0-beta.4 | 5.0.0-beta.4 | Patch available | GHSA-g8mr-85jm-7xhm |
| — | @vitest/browser (npm) | 4.0.0 to before 4.1.8 | 4.1.8 | Patch available | GHSA-g8mr-85jm-7xhm |
| — | @vitest/browser (npm) | 3.0.0 to before 3.2.5 | 3.2.5 | Patch available | GHSA-g8mr-85jm-7xhm |
| — | vite-plus (npm) | before 0.1.24 | 0.1.24 | Patch available | GHSA-g8mr-85jm-7xhm |
- vitest Vendorvitest-dev Affected 3.0.0 to before 3.2.5; 4.0.0 to before 4.1.8; 5.0.0-beta.0 to before 5.0.0-beta.4 Fixed in 3.2.5, 4.1.8, 5.0.0-beta.4 Patch available CNA
- @vitest/browser (npm) Vendor— Affected 5.0.0-beta.0 to before 5.0.0-beta.4 Fixed in 5.0.0-beta.4 Patch available GHSA-g8mr-85jm-7xhm
- @vitest/browser (npm) Vendor— Affected 4.0.0 to before 4.1.8 Fixed in 4.1.8 Patch available GHSA-g8mr-85jm-7xhm
- @vitest/browser (npm) Vendor— Affected 3.0.0 to before 3.2.5 Fixed in 3.2.5 Patch available GHSA-g8mr-85jm-7xhm
- vite-plus (npm) Vendor— Affected before 0.1.24 Fixed in 0.1.24 Patch available GHSA-g8mr-85jm-7xhm
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:*:*:* | — | — | vitest-dev |
- cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:*:*:* Versions — — ·vitest-dev
Remediation
- Fix · CNA vitest (vitest-dev) Fixed in 3.2.5, 4.1.8, 5.0.0-beta.4
- Fix · GHSA-g8mr-85jm-7xhm @vitest/browser (npm) Fixed in 5.0.0-beta.4 Advisory →
- Fix · GHSA-g8mr-85jm-7xhm @vitest/browser (npm) Fixed in 4.1.8 Advisory →
- Fix · GHSA-g8mr-85jm-7xhm @vitest/browser (npm) Fixed in 3.2.5 Advisory →
- Fix · GHSA-g8mr-85jm-7xhm vite-plus (npm) Fixed in 0.1.24 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
Not affected: 1 product
- Red Hat Trusted Artifact Signer
Timeline
- 2026-10-02 Threatist record created from CVE-2026-53633
- 2026-10-03 Alias added: GHSA-g8mr-85jm-7xhm
References
Other 11
- https://github.com/vitest-dev/vitest/security/advisories/GHSA-g8mr-85jm-7xhm
- https://github.com/vitest-dev/vitest/pull/10444
- https://github.com/vitest-dev/vitest/pull/10450
- https://github.com/vitest-dev/vitest/pull/10456
- https://github.com/vitest-dev/vitest/commit/385a1aefd4c2bfa5e7d58bf7c6834c929969f2c7
- https://github.com/vitest-dev/vitest/commit/63e3b2eee4d58da56786a6333f517b9b492528c7
- https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9
- https://github.com/vitest-dev/vitest/releases/tag/v3.2.5
- https://github.com/vitest-dev/vitest/releases/tag/v4.1.8
- https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.4
- https://github.com/vitest-dev/vitest
More vitest-dev vulnerabilities
- TI-2026-34992 Vitest: Arbitrary file can be read and executed when Vitest UI server is listening CVSS 3.1CRITICAL 9.8
- TI-2026-34991 Vitest browser mode serves unsanitized otelCarrier query parameter as inline script CVSS 3.1CRITICAL 9.6
- TI-2025-18644 Remote Code Execution when accessing a malicious website while Vitest API server is listening CVSS 3.1CRITICAL 9.7
- TI-2025-18643 Browser mode serves arbitrary files in vitest CVSS 3.1HIGH 7.5
- TI-2026-76917 Backslash traversal in Vitest mocker exposes files on Windows CVSS 3.1MEDIUM 5.9
- TI-2026-76916 Code injection in Vitest manual mock registration CVSS 3.1MEDIUM 4.7
Sources
- CVE-2026-53633 · CVE Program
- CVE-2026-53633 · NVD
- FIRST EPSS
- GHSA-g8mr-85jm-7xhm · GitHub Advisory Database · CC BY 4.0
- CVE-2026-53633 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences