Path traversal in vitest - CVE-2025-24963

 

Path traversal in vitest - CVE-2025-24963

Published: February 4, 2025 / Updated: April 24, 2026


Vulnerability identifier: #VU127489
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2025-24963
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Vitest
Affected software:
vitest

Detailed vulnerability description

The vulnerability allows a remote attacker to disclose sensitive information.

The vulnerability exists due to path traversal in the __screenshot-error handler on the browser mode HTTP server when handling requests with a user-supplied file parameter. A remote attacker can send a specially crafted request to disclose sensitive information.

Only instances with browser.api.host enabled and exposed on the network are vulnerable.


How to mitigate CVE-2025-24963

Install security update from vendor's website.

Sources