Path traversal in Vite - CVE-2025-58751

 

Path traversal in Vite - CVE-2025-58751

Published: April 8, 2026


Vulnerability identifier: #VU125308
CSH Severity: Low
CVSS v4: 5.1 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2025-58751
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to disclose sensitive information.

The vulnerability exists due to path traversal in servePublicMiddleware / viteServePublicMiddleware when handling crafted path requests to public files. A remote attacker can send a specially crafted request using traversal sequences to disclose sensitive information.

Only applications that expose the Vite dev server to the network, use the public directory feature, and have a symbolic link anywhere inside the public directory are affected. User interaction is required.


Affected software

Vite

How to mitigate CVE-2025-58751

Install security update from vendor's website.

Vite - addressed in versions 5.4.20, 6.3.6, 7.0.7, 7.1.5

External References

Related Security Bulletins