Vitest: Code injection via unauthenticated manual mock registration (vitest-dev vitest)

CVE-2026-112949
MEDIUM 4.7

En bref

Source
NVD
EPSS
EPSS 0.34 % · centile 29 ()
État
PUBLISHED
Publiée
Mise à jour
Attribuée par
GitHub_M
Produits affectés
vitest-dev · vitest
@vitest · mocker
Statut NVD
Awaiting Analysis

Description

Vitest is a Vite-native testing framework for JavaScript and TypeScript projects. From 2.1.0-beta.7 until 4.1.12 and 5.0.3, an unauthenticated non-browser WebSocket client that can reach a development server using interceptorPlugin can register a manual mock whose attacker-controlled url createManualModuleSource inserts unescaped into generated module source. When the developer browser loads the affected module, attacker-controlled JavaScript executes on the development-server origin. This issue is fixed in versions 4.1.12 and 5.0.3.

Faiblesses (CWE)

  • CWE-94 — Injection de code
  • CWE-116 — Encodage ou échappement incorrect de la sortie
  • CWE-306 — Authentification absente sur une fonction critique

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1MEDIUM 4.7CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:NGitHub_M
CVSS 3.1MEDIUM 4.7CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:NNVD · security-advisories@github.com (Secondary)

Avis

Références européennes

Produits affectés

ProduitVersions affectées
vitest-dev · vitest
affectée : >= 2.1.0-beta.7, < 4.1.12
affectée : >= 5.0.0, < 5.0.3
@vitest · mocker
affectée : >= 2.1.0-beta.7, < 4.1.12
affectée : >= 5.0.0, < 5.0.3

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD