Skip to main content
VulnerabilityPublished

CVE-2025-62522: vitejs vite · Path Traversal

Affects vitejs viteSource CVE Database V5

0

Not known to be exploited · public detection template (Nuclei) · CVSS 6.0 Medium · fixed in 7.1.11 : update vitejs vite when convenient.

Data as of 26 Oct 2026, 12:55 UTC

CVSS 4.0 base score
6.0Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.0% chance of exploitation in 30 days – higher than 64% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 7.1.11, 7.0.8, 6.4.1 +4
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Oct 2025

  2. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  3. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  4. Observed by OffSeq 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 26 Oct 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
npmvitepkg:npm/viteOther threatsAffected
  • >=2.9.18 <3.0.0
  • >=3.2.9 <4.0.0
  • >=4.5.3 <5.0.0
  • >=5.2.6 <5.4.21
  • >=6.0.0 <6.4.1
  • >=7.0.0 <7.0.8
  • >=7.1.0 <7.1.11
Fixed in
  • 3.0.0
  • 4.0.0
  • 5.0.0
  • 5.4.21
  • 6.4.1
  • 7.0.8
  • 7.1.11

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

European organizations should take the following specific mitigation steps: 1) Immediately upgrade all Vite instances to the patched versions 5.4.21, 6.4.1, 7.0.8, or 7.1.11 depending on their current version. 2) Audit development environments to ensure that Vite dev servers are not unnecessarily exposed to external networks, especially on Windows hosts. 3) Implement network segmentation and firewall rules to restrict access to development servers to trusted internal IPs only. 4) Educate developers about the risks of exposing dev servers and enforce policies to avoid such exposure. 5) Review server.fs.deny configurations and verify that access controls are correctly enforced post-patch. 6) Monitor network traffic and logs for suspicious requests with trailing backslashes or unusual URL patterns targeting dev servers. 7) Consider using containerized or virtualized development environments with limited network exposure. 8) Integrate vulnerability scanning into CI/CD pipelines to detect usage of vulnerable Vite versions. These measures go beyond generic advice by focusing on environment hardening, developer awareness, and proactive monitoring specific to this vulnerability's exploitation vector.

Description

### Summary Files denied by [`server.fs.deny`](https://vitejs.dev/config/server-options.html#server-fs-deny) were sent if the URL ended with `\` when the dev server is running on Windows. ### Impact Only apps that match the following conditions are affected: - explicitly exposes the Vite dev server to the network (using --host or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) - running the dev server on Windows ### Details `server.fs.deny` can contain patterns matching against files (by default it includes `.env`, `.env.*`, `*.{crt,pem}` as such patterns). These patterns were able to bypass by using a back slash(`\`). The root cause is that `fs.readFile('/foo.png/')` loads `/foo.png`. ### PoC ```shell npm create vite@latest cd vite-project/ cat "secret" > .env npm install npm run dev curl --request-target /.env\ http://localhost:5173 ``` <img width="1593" height="616" alt="image" src="https://github.com/user-attachments/assets/36212f4e-1d3c-4686-b16f-16b35ca9e175" />

References

Community reviews

Loading reviews…