Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @vitest/browser
  4. ›
  5. CVE-2026-47428

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

June 1, 2026

Vitest browser mode served /__vitest_test__/ 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.

References

  • github.com/advisories/GHSA-2h32-95rg-cppp
  • github.com/vitest-dev/vitest/blob/cba2036a197ec8ed42c35a37db78ef07192202c7/packages/browser/src/client/public/esm-client-injector.js
  • github.com/vitest-dev/vitest/blob/cba2036a197ec8ed42c35a37db78ef07192202c7/packages/browser/src/node/serverOrchestrator.ts
  • github.com/vitest-dev/vitest/security/advisories/GHSA-2h32-95rg-cppp
  • nvd.nist.gov/vuln/detail/CVE-2026-47428

Code Behaviors & Features

Detect and mitigate CVE-2026-47428 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 4.0.17 before 4.1.6, all versions starting from 5.0.0-beta.0 before 5.0.0-beta.3

Fixed versions

  • 4.1.6
  • 5.0.0-beta.3

Solution

Upgrade to versions 4.1.6, 5.0.0-beta.3 or above.

Impact 9.6 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@vitest/browser/CVE-2026-47428.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 06 Jun 2026 12:18:24 +0000.