Back to CVE records
Medium 6.5Published Oct 20, 2026

CVE-2026-112948Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file

Updated under an hour ago ()

Does this affect you?

It affects vitest-dev vitest and 3 other products. Add what you run to find out whether that includes you.

No exploitation reported and no EPSS estimate yet.

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.

CVSS
6.5 MEDIUM (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness (CWE)
CWE-200, CWE-552
Known exploited
Not in CISA's KEV catalog
EPSS (exploitation in the next 30 days)
Not loaded for this CVE
Assigned by
GitHub_M
NVD analysis
Awaiting Analysis
Record last updated
Oct 20, 2026
First seen by InfoSec Signals
Oct 20, 2026

Affected products

Affected products
vitest-dev vitest
vitest_dev:vitest (from the name)
from 5.0.0-beta.6, < 5.0.5
CNA record
@vitest browser
vitest:browser (from the name)
from 5.0.0-beta.6, < 5.0.5
CNA record
@vitest ui
vitest:ui (from the name)
from 5.0.0-beta.6, < 5.0.5
CNA record
vitejs vite-plus
vitejs:vite_plus (from the name)
from 1.0.0-rc.0, < 1.3.0
CNA record

References

  • x-refsource-confirm
  • x-refsource-misc
  • x-refsource-misc
  • x-refsource-misc

The CVE record is authoritative. Products marked “from the name” were identified from the CNA's free-text names, not a CPE, and are matched less certainly. This product uses the NVD API but is not endorsed or certified by the NVD.

Your cookie choices
We use essential cookies to run this site, and, only with your consent, an advertising cookie from Google to measure whether our ads lead to sign-ups and subscriptions. See our for details.