Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file (vitest-dev vitest)

CVE-2026-112948
MEDIUM 6.5

En bref

Source
NVD
EPSS
EPSS 0.40 % · centile 36 ()
État
PUBLISHED
Publiée
Mise à jour
Attribuée par
GitHub_M
Produits affectés
vitest-dev · vitest
@vitest · browser
@vitest · ui
vitejs · vite-plus
Statut NVD
Awaiting Analysis

Description

Vitest is a testing framework powered by Vite. From 5.0.0-beta.6 until 5.0.5, Vitest dev servers can misapply server.fs.deny because project servers replace Vite's defaults and the root server adds .vitest-secret-token after Vite compiles its matcher. An attacker who can reach an affected UI, Browser Mode, or API server can read denied project files or the fallback API token at node_modules/.vitest/.vitest-secret-token, and Browser Mode with test.projects can expose JavaScript-compatible .env values through a malicious website. This issue is fixed in version 5.0.5.

Faiblesses (CWE)

  • CWE-200 — Exposition d'informations sensibles à un acteur non autorisé
  • CWE-552 — Fichiers ou répertoires accessibles à des tiers

Références

Scores

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

Avis

Références européennes

Produits affectés

ProduitVersions affectées
vitest-dev · vitest
affectée : >= 5.0.0-beta.6, < 5.0.5
@vitest · browser
affectée : >= 5.0.0-beta.6, < 5.0.5
@vitest · ui
affectée : >= 5.0.0-beta.6, < 5.0.5
vitejs · vite-plus
affectée : >= 1.0.0-rc.0, < 1.3.0

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