# CVE-2025-24963: Browser mode serves arbitrary files in vitest

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.35%, higher than 84% of CVEs (2026-12-01)
- Published: 2025-02-04T16:51:08.000Z
- Modified: 2026-06-17T08:59:53.440Z
- Also known as: GHSA-8gvc-j273-4wm5
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- vitest-dev vitest: >= 2.0.4, < 2.1.9; >= 3.0.0, < 3.0.4
- @vitest/browser (npm): from 2.0.4 before 2.1.9; from 3.0.0 before 3.0.4
- vitest.dev vitest: before 2.1.9; from 3.0.0 before 3.0.4

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/vitest-dev/vitest/security/advisories/GHSA-8gvc-j273-4wm5> (vendor-advisory, web)
- <https://github.com/vitest-dev/vitest/commit/2d62051f13b4b0939b2f7e94e88006d830dc4d1f> (patch, web)
- <https://github.com/vitest-dev/vitest/blob/f17918a79969d27a415f70431e08a9445b051e45/packages/browser/src/node/plugin.ts#L88-L130> (product, web)
- <https://vitest.dev/guide/browser/config.html#browser-api> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-24963> (advisory)
- <https://github.com/vitest-dev/vitest/commit/ed9aeba212df04b83ed01810780663ff2cdd0adf> (web)
- <https://github.com/vitest-dev/vitest> (package)

## Sources

- CVE List: [CVE-2025-24963](https://www.cve.org/CVERecord?id=CVE-2025-24963), CVE Terms of Use, modified 2025-02-12
- GitHub Advisory Database: [GHSA-8gvc-j273-4wm5](https://github.com/advisories/GHSA-8gvc-j273-4wm5), CC-BY-4.0, modified 2025-02-04
- NVD: [CVE-2025-24963](https://nvd.nist.gov/vuln/detail/CVE-2025-24963), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-24963 · Whole record: https://cve.day/CVE-2025-24963.json · Rebuilt by cve.day 2026-11-25T22:58:53.792Z
