CVE-2026-112949

Vitest: Code injection via unauthenticated manual mock registration

MEDIUM
4.7
CVSS Score
Published: October 20, 2026 at 03:19 PM UTC
Updated: October 23, 2026 at 02:16 AM UTC
2 products affected across 2 vendorsVitestMocker

Using vitest by vitest-dev?

Get instant alerts when new vulnerabilities affect vitest - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM4.7
Exploit prediction
EPSS 0.3%
SSVC
PoC

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

>= 2.1.0-beta.7, < 4.1.12>= 5.0.0, < 5.0.3
>= 2.1.0-beta.7, < 4.1.12>= 5.0.0, < 5.0.3

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

4.7MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
HIGH
Privileges
NONE
User Interaction
REQUIRED
Scope
CHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusAWAITING ANALYSIS
CWE
CWE-94CWE-116CWE-306

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card