CVE-2026-112949: vitest: Vitest: Cross-site scripting via unescaped mock module URL | OX.Radar
Breaking: Ruby2Shell - Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2026-112949

vitest: Vitest: Cross-site scripting via unescaped mock module URL

Overview

Published
20 Oct 2026
Modified
23 Oct 2026
Medium CVE
3 Registry packages
10 OS packages
2 Linux distributions
Yes Fix available

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.

Source: OX vulnerability database

Severity

4.7 · MEDIUM

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Weakness: CWE-94, CWE-116, CWE-306

Affected packages · 3

Packages affected by CVE-2026-112949
EcosystemPackageVulnerableFixed in
npm @vitest/mocker >=2.1.0-beta.7, <4.1.12>=5.0.0-beta.1, <5.0.3 4.1.125.0.3
Seal npm @seal-security/vitest-sealsec-mocker >=3.2.4-sp1, <3.2.4-sp999>=3.2.7-sp1, <3.2.7-sp999>=4.0.7-sp1, <4.0.7-sp999>=4.1.2-sp1, <4.1.2-sp999 3.2.4-sp9993.2.7-sp9994.0.7-sp9994.1.2-sp999
Seal npm @vitest/mocker >=3.2.4-sp0, <3.2.4-sp999>=3.2.7-sp0, <3.2.7-sp999>=4.0.7-sp0, <4.0.7-sp999>=4.1.2-sp0, <4.1.2-sp999 3.2.4-sp9993.2.7-sp9994.0.7-sp9994.1.2-sp999

Open a package to see all its vulnerabilities.

Operating systems · 11 fixes

chainguard 1 release · 9 packages

fixed 9
gitlab-rails-ce-18-11 gitlab-rails-ce-19-0 gitlab-rails-ce-19-1 gitlab-rails-ce-fips-19-2 gitlab-rails-ce-19-4 gitlab-rails-ce-19-5 +3
chainguard fixes for CVE-2026-112949
ReleasePackageFixed in
gitlab-rails-ce-18-11 18.11.13-r0
gitlab-rails-ce-19-0 19.0.10-r0
gitlab-rails-ce-19-1 19.1.9-r0
gitlab-rails-ce-fips-19-2 19.2.9-r2
gitlab-rails-ce-19-4 19.4.3-r6
gitlab-rails-ce-19-5 19.5.1-r12

3 more rows

wolfi 1 release · 2 packages

fixed 2
vitess-24 renovate
wolfi fixes for CVE-2026-112949
ReleasePackageFixed in
vitess-24 24.0.5-r3
renovate 44.178.1-r0

References

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.