Skip to main content
VulnerabilityPublished

CVE-2026-47428: vitest · Cross-site Scripting

Affects vitestSource CVE Database V5

0
Compare

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

CVSS 3.1 base score
9.6Critical
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 14 Jul 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
vitest-devvitestAffected
  • >=5.0.0-beta.0 <5.0.0-beta.3
Fixed in
  • 5.0.0-beta.3
vitest-devvitestAffected
  • >=4.0.17 <4.1.6
Fixed in
  • 4.1.6
npm@vitest/browserpkg:npm/%40vitest/browserOther threatsAffected
  • >=4.0.17 <4.1.6
Fixed in
  • 4.1.6
npm@vitest/browserpkg:npm/%40vitest/browserOther threatsAffected
  • >=5.0.0-beta.0 <5.0.0-beta.3
Fixed in
  • 5.0.0-beta.3

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

Community reviews

Loading reviews…