CVE-2026-112949
vitest: Vitest: Cross-site scripting via unescaped mock module URL
Overview
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
| Ecosystem | Package | Vulnerable | Fixed 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
| Release | Package | Fixed 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
| Release | Package | Fixed in |
|---|---|---|
| vitess-24 | 24.0.5-r3 | |
| renovate | 44.178.1-r0 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-112949
- github.com https://github.com/vitest-dev/vitest
- github.com https://github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35
- github.com https://github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473
- github.com https://github.com/vitest-dev/vitest/releases/tag/v4.1.12
- github.com https://github.com/vitest-dev/vitest/releases/tag/v5.0.3
- github.com https://github.com/vitest-dev/vitest/security/advisories/GHSA-qxg6-89mg-rqv8
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-112949
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2026-112949
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.