CVE-2025-24963Vitest.dev Vitest
High 7.5 No auth needed
Follow: this CVE · Vitest.dev · Vitest.dev Vitest We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- —
- Auth required
- No
- Published
- Feb 4, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
Vitest is a testing framework powered by Vite. The `__screenshot-error` handler on the browser mode HTTP server that responds any file on the file system. Especially if the server is exposed on the network by `browser.api.host: true`, an attacker can send a request to that handler from remote to get the content of arbitrary files.This `__screenshot-error` handler on the browser mode HTTP server responds any file on the file system. This code was added by commit `2d62051`. Users explicitly exposing the browser mode server to the network by `browser.api.host: true` may get any files exposed. This issue has been addressed in versions 2.1.9 and 3.0.4. Users are advised to upgrade. There are no known workarounds for this vulnerability.
What to do
- Apply the vendor's security update for Vitest.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @vitest/browser |
≥ 2.0.4 < 2.1.9 |
2.1.9 |
npm install @vitest/browser@2.1.9 |
| npm | @vitest/browser |
≥ 3.0.0 < 3.0.4 |
3.0.4 |
npm install @vitest/browser@3.0.4 |
Per OSV / GitHub Advisories (GHSA-8gvc-j273-4wm5). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| vitest.dev | vitest | < 2.1.9 |
| vitest.dev | vitest | ≥ 3.0.0 < 3.0.4 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Product
- github.com Patch
- github.com Vendor Advisory
- vitest.dev Product