Browser mode serves arbitrary files in vitest
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 |
|
Configuration 1 [-]
|
No data.
No data available yet.
| Source | ID | Title |
|---|---|---|
EUVD |
EUVD-2025-0224 | Vitest is a testing framework powered by Vite. The `__screenshot-error` handler on the browser mode HTTP server that responds any file on the file system. Especially if the server is exposed on the network by `browser.api.host: true`, an attacker can send a request to that handler from remote to get the content of arbitrary files.This `__screenshot-error` handler on the browser mode HTTP server responds any file on the file system. This code was added by commit `2d62051`. Users explicitly exposing the browser mode server to the network by `browser.api.host: true` may get any files exposed. This issue has been addressed in versions 2.1.9 and 3.0.4. Users are advised to upgrade. There are no known workarounds for this vulnerability. |
Github GHSA |
GHSA-8gvc-j273-4wm5 | Vitest browser mode serves arbitrary files |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: 2.4% (2.353% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Vitest.dev
Vitest.dev vitest |
|
| CPEs | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* | |
| Vendors & Products |
Vitest.dev
Vitest.dev vitest |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
epss
|
epss
|
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| Description | Vitest is a testing framework powered by Vite. The `__screenshot-error` handler on the browser mode HTTP server that responds any file on the file system. Especially if the server is exposed on the network by `browser.api.host: true`, an attacker can send a request to that handler from remote to get the content of arbitrary files.This `__screenshot-error` handler on the browser mode HTTP server responds any file on the file system. This code was added by commit `2d62051`. Users explicitly exposing the browser mode server to the network by `browser.api.host: true` may get any files exposed. This issue has been addressed in versions 2.1.9 and 3.0.4. Users are advised to upgrade. There are no known workarounds for this vulnerability. | |
| Title | Browser mode serves arbitrary files in vitest | |
| Weaknesses | CWE-22 | |
| References |
|
|
| Metrics |
cvssV3_1
|