CVE-2026-47428
Vitest browser mode serves unsanitized otelCarrier query parameter as inline script
Also known as GHSA-2h32-95rg-cppp
Mitigation
- Upgrade @vitest/browser to one of 4.1.6, 5.0.0-beta.3 (or later in the same release line).
Who should check
- Projects that depend on npm package @vitest/browser (>= 4.0.17, < 4.1.6)
- Anyone running vitest-dev vitest >= 4.0.17, < 4.1.6; >= 5.0.0-beta.0, < 5.0.0-beta.3
Vulnerability facts
- Affected
- @vitest/browser >= 4.0.17, < 4.1.6
- Fixed in
- 4.1.6, 5.0.0-beta.3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.6 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.61% chance of exploitation in 30 days (percentile 44, 2026-11-26)
- CWE
- CWE-79
- Modified
Description
Vitest is a testing framework powered by Vite. From 4.0.17 until 4.1.6 and 5.0.0-beta.3, Vitest Browser Mode served /__vitest_test__/ with the otelCarrier query parameter inserted directly into an inline module script, allowing a crafted browser-runner URL to execute arbitrary JavaScript in the Vitest server origin and recover VITEST_API_TOKEN for authenticated API calls. This issue is fixed in versions 4.1.6 and 5.0.0-beta.3.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm @vitest/browser | >= 4.0.17, < 4.1.6 | 4.1.6, 5.0.0-beta.3 | osv |
| vitest-dev vitest | >= 4.0.17, < 4.1.6; >= 5.0.0-beta.0, < 5.0.0-beta.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-47428. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-47428.md Affected: @vitest/browser >= 4.0.17, < 4.1.6 Fixed in: 4.1.6, 5.0.0-beta.3 Steps: 1. Search this machine and project for @vitest/browser (npm), vitest-dev vitest: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
Other
- https://github.com/vitest-dev/vitest/releases/tag/v4.1.6
- https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.3
- https://github.com/vitest-dev/vitest
- https://github.com/vitest-dev/vitest/blob/cba2036a197ec8ed42c35a37db78ef07192202c7/packages/browser/src/client/public/esm-client-injector.js#L41
- https://github.com/vitest-dev/vitest/blob/cba2036a197ec8ed42c35a37db78ef07192202c7/packages/browser/src/node/serverOrchestrator.ts#L48
FAQ
Is CVE-2026-47428 being exploited?
There is no confirmed exploitation: CVE-2026-47428 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.61% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-47428?
Critical: CVSS 9.6 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-47428?
@vitest/browser >= 4.0.17, < 4.1.6.
Is there a fix for CVE-2026-47428?
Yes. Fixed in 4.1.6, 5.0.0-beta.3. Upgrade @vitest/browser to one of 4.1.6, 5.0.0-beta.3 (or later in the same release line).
How do I check if I'm affected by CVE-2026-47428?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.