CVE-2026-112949vitest-dev vitest
Medium 4.7 No auth needed
Follow: this CVE · vitest-dev · vitest-dev vitest We alert you by email or Slack (account required).
- Priority
- 43
- CVSS 3.1
- 4.7
- EPSS
- —
- Auth required
- No
- Published
- Oct 20, 2026
- Updated
- Oct 23, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
Vitest is a Vite-native testing framework for JavaScript and TypeScript projects. From 2.1.0-beta.7 until 4.1.12 and 5.0.3, an unauthenticated non-browser WebSocket client that can reach a development server using interceptorPlugin can register a manual mock whose attacker-controlled url createManualModuleSource inserts unescaped into generated module source. When the developer browser loads the affected module, attacker-controlled JavaScript executes on the development-server origin. This issue is fixed in versions 4.1.12 and 5.0.3.
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/mocker |
≥ 2.1.0-beta.7 < 4.1.12 |
4.1.12 |
npm install @vitest/mocker@4.1.12 |
| npm | @vitest/mocker |
≥ 5.0.0-beta.1 < 5.0.3 |
5.0.3 |
npm install @vitest/mocker@5.0.3 |
Per OSV / GitHub Advisories (GHSA-qxg6-89mg-rqv8). Check the version in your lockfile before upgrading.
Affected products
- vitest-dev · vitest
- @vitest · mocker
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.