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 Browser Mode. The vulnerability arises because the otelCarrier query parameter is directly inserted into an inline module script without proper neutralization. This allows crafted URLs to execute arbitrary JavaScript in the Vitest server origin and potentially recover sensitive API tokens. The issue is fixed starting from version 4.1.6 and later.
AI Analysis
Technical Summary
CVE-2026-47428 is a critical cross-site scripting (CWE-79) vulnerability in the Vitest testing framework's Browser Mode. Specifically, in versions >=4.0.17 <4.1.6 and =5.0.0-beta.3, the otelCarrier query parameter is unsafely embedded into an inline module script served at /__vitest_test__/, enabling an attacker to execute arbitrary JavaScript in the server origin context. This can lead to disclosure of the VITEST_API_TOKEN, allowing authenticated API calls to be made by the attacker. The vulnerability is resolved in versions 4.1.6 and above.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary JavaScript code in the Vitest server origin via a crafted browser-runner URL. This leads to full compromise of confidentiality, integrity, and availability, including recovery of the VITEST_API_TOKEN, which can be used for authenticated API access.
Mitigation Recommendations
A fix is available in Vitest version 4.1.6 and later. Users should upgrade to version 4.1.6 or newer to remediate this vulnerability. Since the vendor advisory does not specify alternative mitigations, upgrading is the recommended action. Patch status is confirmed by the version fix information in the description.
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 Browser Mode. The vulnerability arises because the otelCarrier query parameter is directly inserted into an inline module script without proper neutralization. This allows crafted URLs to execute arbitrary JavaScript in the Vitest server origin and potentially recover sensitive API tokens. The issue is fixed starting from version 4.1.6 and later.
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 (CWE-79) vulnerability in the Vitest testing framework's Browser Mode. Specifically, in versions >=4.0.17 <4.1.6 and =5.0.0-beta.3, the otelCarrier query parameter is unsafely embedded into an inline module script served at /__vitest_test__/, enabling an attacker to execute arbitrary JavaScript in the server origin context. This can lead to disclosure of the VITEST_API_TOKEN, allowing authenticated API calls to be made by the attacker. The vulnerability is resolved in versions 4.1.6 and above.
Potential Impact
Successful exploitation allows remote attackers to execute arbitrary JavaScript code in the Vitest server origin via a crafted browser-runner URL. This leads to full compromise of confidentiality, integrity, and availability, including recovery of the VITEST_API_TOKEN, which can be used for authenticated API access.
Mitigation Recommendations
A fix is available in Vitest version 4.1.6 and later. Users should upgrade to version 4.1.6 or newer to remediate this vulnerability. Since the vendor advisory does not specify alternative mitigations, upgrading is the recommended action. Patch status is confirmed by the version fix information in the description.
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/21/2026, 22:46:31 UTC
Last updated: 08/25/2026, 22:52:11 UTC
Views: 78
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.