CVE-2026-47428: vitest · Cross-site Scripting
Affects vitestSource CVE Database V5
Not known to be exploited · CVSS 9.6 Critical : upgrade to 5.0.0-beta.3 or 4.1.6 as a priority.
Data as of 27 Nov 2026, 22:51 UTC
- EPSS
- 0.6% chance of exploitation in 30 days – higher than 43% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 5.0.0-beta.3, 4.1.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 14 Jul 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 28 Nov 2026.
What to do
Upgrade vitest to 5.0.0-beta.3 or 4.1.6; @vitest/browser to 4.1.6; @vitest/browser to 5.0.0-beta.3.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| vitest-devvitest | Affected
| Fixed in
|
| vitest-devvitest | Affected
| Fixed in
|
npm@vitest/browserpkg:npm/%40vitest/browserOther threats | Affected
| Fixed in
|
npm@vitest/browserpkg:npm/%40vitest/browserOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
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.
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.
References
- github.com/vitest-dev/vitest/security/advisories/GHSA-2h32-95rg-cppp (opens in a new tab)
- github.com/vitest-dev/vitest/pull/10283 (opens in a new tab)
- github.com/vitest-dev/vitest/pull/10285 (opens in a new tab)
- github.com/vitest-dev/vitest/commit/18af98cee1830604d57f6a02bf28f8067cdffc06 (opens in a new tab)
- github.com/vitest-dev/vitest/commit/3514f9fa135c90e1c35754fc4d27c9cf351faafa (opens in a new tab)
- github.com/vitest-dev/vitest/releases/tag/v4.1.6 (opens in a new tab)
- github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.3 (opens in a new tab)