CVE-2025-58751: Vite middleware may serve files starting with the same name with the public directory
Affects viteSource GCVE Database
Not known to be exploited · public detection template (Nuclei) · CVSS 2.3 Low : upgrade to 7.1.5 when convenient.
Data as of 13 Nov 2026, 21:06 UTC
- Patch
- Available – fixed in 7.1.5
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 8 Sep 2025
Detectable: evidence found.
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
Upgrade vite to 7.1.5.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewvitepkg:brew/viteOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available in Vite version 7.1.5 that fixes this vulnerability. Users should upgrade affected Vite versions (>=2.5.1 <7.1.5) to 7.1.5 or later. Until patched, avoid exposing the Vite dev server to the network or avoid using symbolic links in the public directory to mitigate the risk.
Description
Vite middleware serving files from the public directory may incorrectly serve files outside the intended directory when symbolic links exist in the public directory and the server is exposed to the network. This occurs due to a path normalization and prefix check flaw in the middleware, allowing path traversal to access files outside the public directory despite deny rules. The issue affects Vite versions from 2.5.1 up to but not including 7.1.5 and has a low severity rating.
References
- github.com/vitejs/vite/security/advisories/GHSA-g4jq-h2w9-997c (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-58751 (opens in a new tab)
- github.com/lukeed/sirv/commit/f0113f3f8266328d804ee808f763a3c11f8997eb (opens in a new tab)
- github.com/vitejs/vite/commit/09f2b52e8d5907f26602653caf41b3a56692600d (opens in a new tab)
- github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069 (opens in a new tab)
- github.com/vitejs/vite/commit/63e2a5d232218f3f8d852056751e609a5367aaec (opens in a new tab)
- github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0 (opens in a new tab)
- github.com/vitejs/vite (opens in a new tab)