Security Digest · Vulnerability record

CVE-2026-47428: Vitest browser mode serves unsanitized otelCarrier query parameter as inline script

Vitest is a testing framework powered by Vite.

CVSS 9.6 Critical EPSS 0.6% · p49

Should you act?

Critical and remotely reachable

No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 0.6%, percentile 49: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 49% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Needs a user to click or open something. Phishing makes that realistic, but it is not wormable.
  • Only applies if your dependency tree includes @vitest/browser (npm) >= 4.0.17, < 4.1.6, fixed in 4.1.6; @vitest/browser (npm) >= 5.0.0-beta.0, < 5.0.0-beta.3, fixed in 5.0.0-beta.3. Check your lockfile, including transitive dependencies.

What it is

Vitest is a testing framework powered by Vite. From 4.0.17 until 4.1.6 and 5.0.0-beta.3, Vitest Browser Mode served /vitesttest/ with the otelCarrier query parameter inserted directly into an inline module script, allowing a crafted browser-runner URL to execute arbitrary JavaScript in the Vitest server origin and recover VITESTAPITOKEN for authenticated API calls. This issue is fixed in versions 4.1.6 and 5.0.0-beta.3.

From the GitHub advisory

Summary

Vitest browser mode served /vitesttest/ with the otelCarrier query parameter inserted directly into an inline module script. Because this value was treated as JavaScript source rather than data, an attacker could craft a browser-runner URL that executes arbitrary JavaScript in the Vitest server origin.

https://github.com/vitest-dev/vitest/blob/cba2036a197ec8ed42c35a37db78ef07192202c7/packages/browser/src/node/serverOrchestrator.ts#L48

https://github.com/vitest-dev/vitest/blob/cba2036a197ec8ed42c35a37db78ef07192202c7/packages/browser/src/client/public/esm-client-injector.js#L41

The same generated page embeds VITESTAPITOKEN, which is used to authenticate Vitest WebSocket APIs. Script execution in this origin can therefore recover the token and make authenticated API calls.

Weakness type: CWE-79.

Product: @vitest/browser (npm) · Assigned by: GitHub_M · Published: 2026-07-14

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
npm@vitest/browser>= 4.0.17, < 4.1.64.1.6
npm@vitest/browser>= 5.0.0-beta.0, < 5.0.0-beta.35.0.0-beta.3
VendorProductAffected versions (per CVE record)
vitest-devvitest>= 4.0.17, < 4.1.6, >= 5.0.0-beta.0, < 5.0.0-beta.3

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.6 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
GitHub3.19.6 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: required (a user must click/open something)
  • Scope: changed (can affect other components)

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.61% probability of exploitation activity in the next 30 days; percentile 49.

Timeline

  • — GitHub-reviewed advisory GHSA-2h32-95rg-cppp published (critical)
  • — CVE record published by GitHub_M
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-2h32-95rg-cppp github.com
  2. CVE.org record CVE-2026-47428 cve.org
  3. NVD entry CVE-2026-47428 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com
  5. github.com github.com
  6. github.com github.com
  7. github.com github.com
  8. github.com github.com
  9. github.com github.com

Critical npm advisories · Today’s Security Digest