Live threats

All CVEs / vitest-dev

CVE-2026-112949vitest-dev vitest

Medium 4.7 No auth needed

Priority
43
CVSS 3.1
4.7
EPSS
—
Auth required
No
Published
Oct 20, 2026
Updated
Oct 23, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94, CWE-116, CWE-306
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.

Original NVD text.

What to do

  1. Apply the vendor's security update for vitest.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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

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.