CVE-2026-47428: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in vitest-dev vitest
Vitest versions from 4.0.17 up to but not including 4.1.6, and version 5.0.0-beta.3, contain a cross-site scripting (XSS) vulnerability in the Browser Mode. The vulnerability arises from improper neutralization of the otelCarrier query parameter, which is inserted directly into an inline module script. This flaw allows an attacker to execute arbitrary JavaScript in the Vitest server origin and potentially recover the VITEST_API_TOKEN, enabling authenticated API calls. The issue is fixed starting from version 4.1.6 and in 5.0.0-beta.3.
AI Analysis
Technical Summary
CVE-2026-47428 is a critical cross-site scripting vulnerability (CWE-79) in the Vitest testing framework's Browser Mode. Specifically, from versions 4.0.17 until 4.1.6 and including 5.0.0-beta.3, the otelCarrier query parameter is directly embedded into an inline module script without proper sanitization. This allows crafted URLs to execute arbitrary JavaScript in the context of the Vitest server origin, leading to potential theft of the VITEST_API_TOKEN and unauthorized API access. The vulnerability is resolved in versions 4.1.6 and 5.0.0-beta.3.
Potential Impact
Successful exploitation enables remote attackers to execute arbitrary JavaScript code in the Vitest server origin context, leading to full compromise of confidentiality, integrity, and availability. Specifically, attackers can recover the VITEST_API_TOKEN, allowing authenticated API calls that could manipulate or extract sensitive data or functionality.
Mitigation Recommendations
A fix is available in Vitest versions 4.1.6 and 5.0.0-beta.3. Users should upgrade to these versions or later to remediate this vulnerability. Since the vendor advisory or patch links are not explicitly provided, verify the upgrade path from official Vitest release notes or repositories before deployment.
CVE-2026-47428: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in vitest-dev vitest
Description
Vitest versions from 4.0.17 up to but not including 4.1.6, and version 5.0.0-beta.3, contain a cross-site scripting (XSS) vulnerability in the Browser Mode. The vulnerability arises from improper neutralization of the otelCarrier query parameter, which is inserted directly into an inline module script. This flaw allows an attacker to execute arbitrary JavaScript in the Vitest server origin and potentially recover the VITEST_API_TOKEN, enabling authenticated API calls. The issue is fixed starting from version 4.1.6 and in 5.0.0-beta.3.
CVSS v3.1
Score 9.6critical
Affected software
pkg:npm/vitest-dev/vitestRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-47428 is a critical cross-site scripting vulnerability (CWE-79) in the Vitest testing framework's Browser Mode. Specifically, from versions 4.0.17 until 4.1.6 and including 5.0.0-beta.3, the otelCarrier query parameter is directly embedded into an inline module script without proper sanitization. This allows crafted URLs to execute arbitrary JavaScript in the context of the Vitest server origin, leading to potential theft of the VITEST_API_TOKEN and unauthorized API access. The vulnerability is resolved in versions 4.1.6 and 5.0.0-beta.3.
Potential Impact
Successful exploitation enables remote attackers to execute arbitrary JavaScript code in the Vitest server origin context, leading to full compromise of confidentiality, integrity, and availability. Specifically, attackers can recover the VITEST_API_TOKEN, allowing authenticated API calls that could manipulate or extract sensitive data or functionality.
Mitigation Recommendations
A fix is available in Vitest versions 4.1.6 and 5.0.0-beta.3. Users should upgrade to these versions or later to remediate this vulnerability. Since the vendor advisory or patch links are not explicitly provided, verify the upgrade path from official Vitest release notes or repositories before deployment.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-19T19:37:43.527Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a56962468715ace431dc694
Added to database: 07/14/2026, 20:03:48 UTC
Last enriched: 07/14/2026, 22:32:34 UTC
Last updated: 07/14/2026, 23:27:47 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.