# CVE-2025-46565: Vite's server.fs.deny bypassed with /. for files under project root

- Severity: Medium 6.0 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.27%, higher than 70% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-04-30T17:40:27.000Z
- Modified: 2026-09-10T03:50:23.700Z
- Also known as: GHSA-859w-5945-r5v3
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Vite is a frontend tooling framework for javascript. Prior to versions 6.3.4, 6.2.7, 6.1.6, 5.4.19, and 4.5.14, the contents of files in the project root that are denied by a file matching pattern can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. Only files that are under project root and are denied by a file matching pattern can be bypassed. `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 for files under `root` by using a combination of slash and dot (/.). This issue has been patched in versions 6.3.4, 6.2.7, 6.1.6, 5.4.19, and 4.5.14.

(As written by CVE List.)

## Affected

- vitejs vite: >= 6.3.0, < 6.3.4; >= 6.2.0, < 6.2.7; >= 6.0.0, < 6.1.6; >= 5.0.0, < 5.4.19; < 4.5.14; before 4.5.14; from 5.0.0 before 5.4.19; from 6.0.0 before 6.1.6; from 6.2.0 before 6.2.7; from 6.3.0 before 6.3.4
- vite (npm): from 6.3.0 before 6.3.4; from 6.2.0 before 6.2.7; from 6.0.0 before 6.1.6; from 5.0.0 before 5.4.19; before 4.5.14

## Every score

- GitHub_M: CVSS:4.0 6.0 Medium `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`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/vitejs/vite/security/advisories/GHSA-859w-5945-r5v3> (exploit, vendor-advisory, web)
- <https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-46565> (advisory)
- <https://github.com/vitejs/vite> (package)

## Sources

- CVE List: [CVE-2025-46565](https://www.cve.org/CVERecord?id=CVE-2025-46565), CVE Terms of Use, modified 2025-05-02
- GitHub Advisory Database: [GHSA-859w-5945-r5v3](https://github.com/advisories/GHSA-859w-5945-r5v3), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-46565](https://nvd.nist.gov/vuln/detail/CVE-2025-46565), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-46565 · Whole record: https://cve.day/CVE-2025-46565.json · Rebuilt by cve.day 2026-11-25T22:58:57.370Z
