CVE-2026-47428 Details
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.
A critical cross-site scripting vulnerability has been identified in Vitest, a testing framework powered by Vite. This issue affects Vitest versions 4.0.17 prior to 4.1.6 and 5.0.0-beta.3. The vulnerability arises in Vitest Browser Mode, where the 'otelCarrier' query parameter is unsanitized and directly injected into an inline module script. This flaw allows a crafted browser-runner URL to execute arbitrary JavaScript in the Vitest server origin, potentially leading to the theft of the 'VITEST_API_TOKEN', which is used for authenticated API calls. Exploitation of this vulnerability can be chained with server-side code execution by writing a payload into 'vite.config.ts', which is then executed in Node when the config is reloaded.
Users can upgrade to Vitest versions 4.1.6 or 5.0.0-beta.3 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 14, 2026CISA-ADP
Assessed Jul 15, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/vitest-dev/vitest/security/advisories/GHSA-2h32-95rg-cppp | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/vitest-dev/vitest/commit/18af98cee1830604d57f6a02bf28f8067cdffc06 | [email protected] | Source CodeVendor |
| https://github.com/vitest-dev/vitest/commit/3514f9fa135c90e1c35754fc4d27c9cf351faafa | [email protected] | Source CodeVendor |
| https://github.com/vitest-dev/vitest/pull/10283 | [email protected] | Issue TrackingVendor |
| https://github.com/vitest-dev/vitest/pull/10285 | [email protected] | Issue TrackingVendor |
| https://github.com/vitest-dev/vitest/releases/tag/v4.1.6 | [email protected] | Release NotesVendor |
| https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.3 | [email protected] | Release NotesVendor |
| https://github.com/vitest-dev/vitest/security/advisories/GHSA-2h32-95rg-cppp | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Vitest | >= 4.0.17, < 4.1.6 (semver) >= 5.0.0-beta.0, < 5.0.0-beta.3 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 15, 2026 | CVE Modified | CISA-ADP |
| Jul 14, 2026 | New CVE Received | [email protected] |
Volerion