CVE-2025-24963
Published: 04 February 2025
Summary
CVE-2025-24963 is a medium-severity Path Traversal (CWE-22) vulnerability in Vitest.Dev Vitest. Its CVSS base score is 5.9 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked in the top 4.0% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified are NIST 800-53 SI-10 (Information Input Validation) and SI-2 (Flaw Remediation).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
Directly mitigates the path traversal vulnerability by requiring timely patching to Vitest versions 2.1.9 or 3.0.4 as specified in the advisory.
Prevents exploitation of the path traversal in the __screenshot-error handler by enforcing validation of file path inputs to block arbitrary file access.
Limits exposure of the vulnerable browser mode HTTP server by restricting unnecessary network exposure features like browser.api.host: true to essential functionality only.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Path traversal in exposed browser mode HTTP server enables remote exploitation of public-facing application (T1190) to read arbitrary local files (T1005).
NVD 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…
more
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.
Deeper analysisAI
CVE-2025-24963 is a path traversal vulnerability (CWE-22) in Vitest, a Vite-powered testing framework. The issue affects the browser mode HTTP server, specifically the `__screenshot-error` handler, which responds with the contents of arbitrary files on the file system. This flaw was introduced by commit `2d62051` in the `packages/browser/src/node/plugin.ts` file and impacts users running Vitest in browser mode.
An attacker can exploit this vulnerability remotely if the browser mode server is explicitly exposed on the network via the `browser.api.host: true` configuration. By sending a crafted request to the `__screenshot-error` handler, the attacker can read the contents of any file accessible to the server process, achieving high confidentiality impact with no privileges required, though exploitation requires high attack complexity. The CVSS v3.1 base score is 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
The Vitest security advisory (GHSA-8gvc-j273-4wm5) confirms the issue has been addressed in versions 2.1.9 and 3.0.4, advising users to upgrade immediately. No workarounds are available. Additional details are in the Vitest browser configuration documentation and the fixing commit.
Details
- CWE(s)