Files or Directories Accessible to External Parties Affecting @vitest/ui package, versions >=5.0.0-beta.6 <5.0.5


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.41% (34th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-VITESTUI-21347789
  • published21 Oct 2026
  • disclosed20 Oct 2026
  • creditThai Son Dinh, tikket1, Tomohiro Yamada

Introduced: 20 Oct 2026

NewCVE-2026-112948  (opens in a new tab)
CWE-552  (opens in a new tab)

How to fix?

Upgrade @vitest/ui to version 5.0.5 or higher.

Overview

@vitest/ui is an UI for Vitest

Affected versions of this package are vulnerable to Files or Directories Accessible to External Parties via the Vite dev server's server.fs.deny configuration, which drops its built-in defaults (blocking .env, certificates, .npmrc, etc.) whenever any value is appended to the deny list. When @vitest/ui (or Browser Mode or the api option) starts an HTTP server, the previous fix appended the API token file to server.fs.deny after Vite had already compiled the matcher, causing Vite to discard its default protections. An unauthenticated remote attacker can then request sensitive files - such as .env files or private key material - through the Vite dev server.

Note: This is only exploitable when Vitest runs an HTTP server, which occurs with the UI (--ui), Browser Mode, or api enabled.

CVSS Base Scores

version 4.0
version 3.1