Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-47428: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in vitest-dev vitest

0
Critical
VulnerabilityCVE-2026-47428cvecve-2026-47428cwe-79
Published: 07/14/2026 (07/14/2026, 19:30:19 UTC)
Source: CVE Database V5
Vendor/Project: vitest-dev
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected software

vitest-dev/vitest
pkg:npm/vitest-dev/vitest
Affected versions
>=4.0.17 <4.1.6=5.0.0-beta.3

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/14/2026, 22:32:34 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses