Vitest: Code injection via unauthenticated manual mock registration (vitest-dev vitest)
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
Rechercher sur…
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
- https://github.com/vitest-dev/vitest/security/advisories/GHSA-qxg6-89mg-rqv8
- https://github.com/vitest-dev/vitest/commit/15cc006aa9f8683dc5f7e895d011fa7dc751ce35
- https://github.com/vitest-dev/vitest/commit/b825313243dc55757e8d7c0f9e7a792135e13473
- https://github.com/vitest-dev/vitest/releases/tag/v4.1.12
- https://github.com/vitest-dev/vitest/releases/tag/v5.0.3
Scores
| Version | Score | Vecteur | Évalué par |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N | GitHub_M |
| CVSS 3.1 | MEDIUM 4.7 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N | NVD · security-advisories@github.com (Secondary) |
Avis
- GHSA-qxg6-89mg-rqv8 — Vitest: Code injection via unauthenticated manual mock registration
Références européennes
- ENISA EUVD · EUVD-2026-105148
- GCVE · GCVE-0-2026-112949
Produits affectés
| Produit | Versions 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
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |