CVE Catalog

CVE-2026-112949

MediumCVSS 4.7
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.24%

14th percentile - higher than 14% of all known CVEs

Summary

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 in Vitest 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.

Risk Assessment

An attacker may execute arbitrary JavaScript in the context of the development server, potentially leading to data or session theft or further attacks on the development environment. The risk affects developers using Vitest with an accessible dev server.

Recommendation

Update Vitest to version 4.1.12 or 5.0.3. Restrict access to the dev server and do not expose it on untrusted networks.

Other vulnerabilities in Vitest

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS