CVE-2025-24963 json
Browser mode serves arbitrary files in vitest
published last yr. modified 4mo ago also GHSA-8gvc-j273-4wm5 , EUVD-2025-0224
- cvss
- 5.9
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.4%
- EPSS 2.4% chance of exploitation in 30 days, percentile 84%
- public exploits
- 0
- none known, plus a Nuclei check
Summary
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.
Patch / fix
- npm @vitest/browser 2.1.9, 3.0.4
- vitest.dev vitest 2.1.9, 3.0.4
Is CVE-2025-24963 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
2.40% chance of exploitation in the next 30 days, higher than 84% of all scored CVEs (FIRST EPSS, 2026-11-09).
Exploits and checks
- Nuclei template Vitest Browser Mode - Local File Read nuclei detection template
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @vitest/browser | >=2.0.4, <2.1.9 >=3.0.0, <3.0.4 |
2.1.9 3.0.4 |
Affected products
- vitest-dev vitest
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/vitest-dev/vitest/commit/2d62051f13b4b0939b2f7e94e88006d830dc4d1f
web, patch
-
github.com
/vitest-dev/vitest/commit/ed9aeba212df04b83ed01810780663ff2cdd0adf
web
-
github.com
/vitest-dev/vitest/security/advisories/GHSA-8gvc-j273-4wm5
web, vendor-advisory
-
github.com
/vitest-dev/vitest/blob/f17918a79969d27a415f70431e08a9445b051e45/packages/browser/src/node/plugin.ts#L88-L130
web, product
-
vitest.dev
/guide/browser/config.html#browser-api
web, product
-
nvd.nist.gov
/vuln/detail/CVE-2025-24963
advisory
-
github.com
/vitest-dev/vitest
package
Sources
- CVE List CVE-2025-24963
- GitHub Advisory GHSA-8gvc-j273-4wm5
- NVD CVE-2025-24963
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.