Skip to content

← Actionable
Critical, CVSS 9.6amended

Vitest browser mode serves unsanitized otelCarrier query parameter as inline script

CVE-2026-47428GHSA-2h32-95rg-cppp

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (@vitest/browser 5.0.0-beta.3, 4.1.6), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm @vitest/browser

    Affected
    >= 4.0.17, < 4.1.6>= 5.0.0-beta.0, < 5.0.0-beta.3
    Fixed in
    5.0.0-beta.3, 4.1.6

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
9.6 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
EPSS
  • CVE-2026-47428: 0.58% estimated exploitation activity in the next 30 days; percentile 47.76 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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. Impact This issue affects users running Vitest browser mode. A victim must open or navigate to a crafted Vitest browser-runner URL while the Vitest browser server is running. In the default local browser-mode…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-2h32-95rg-cppp

  2. Revision 2 · amended ·

    Amended from osv record GHSA-2h32-95rg-cppp

  3. Revision 1 · created ·

    Published from ghsa record GHSA-2h32-95rg-cppp

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-47428

Advisory: Vitest browser mode serves unsanitized otelCarrier query parameter as inline script
IDs: CVE-2026-47428, GHSA-2h32-95rg-cppp
Record: https://patchnext.com/advisories/cve-2026-47428 (revision 3, source checked 26 Oct 2026, 12:52 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Critical (CVSS 9.6)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: @vitest/browser 5.0.0-beta.3, 4.1.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm @vitest/browser: affected >= 4.0.17, < 4.1.6; >= 5.0.0-beta.0, < 5.0.0-beta.3; fixed in 5.0.0-beta.3, 4.1.6

## Suggested inspection (read-only)
- `npm ls @vitest/browser --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on @vitest/browser.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-2h32-95rg-cppp (GitHub-reviewed advisory GHSA-2h32-95rg-cppp lists affected ranges: npm @vitest/browser >=4.0.17 =5.0.0-beta.0 <5.0.0-beta.3)
- Verified: https://osv.dev/vulnerability/GHSA-2h32-95rg-cppp (OSV record GHSA-2h32-95rg-cppp lists affected ranges: npm @vitest/browser >=4.0.17 =5.0.0-beta.0 <5.0.0-beta.3 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…