Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| vitest-dev | vitest | affected |
|
||||||
| @vitest | browser | affected |
|
||||||
| @vitest | ui | affected |
|
||||||
| vitejs | vite-plus | affected |
|
No data.
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Vitejs | Vite-plus |
|
||||||||
| Vitest.dev | Browser |
|
||||||||
| Vitest.dev | Ui |
|
||||||||
| Vitest.dev | Vitest |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-p458-7748-mcp3 | Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.400% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Vitejs
Vitejs vite-plus Vitest.dev Vitest.dev browser Vitest.dev ui Vitest.dev vitest |
|
| Vendors & Products |
Vitejs
Vitejs vite-plus Vitest.dev Vitest.dev browser Vitest.dev ui Vitest.dev vitest |
| Type | Values Removed | Values Added |
|---|---|---|
| References |
| |
| Metrics |
threat_severity
|
threat_severity
|
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file | |
| Weaknesses | CWE-200 CWE-552 |
|
| References |
| |
| Metrics |
cvssV3_1
|