Vulnerability · Published May 1, 2025 · Assigned by GitHub_M

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

Medium 6.0

In plain English

A medium-severity path traversal in vite from vitejs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 69% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.0Medium
Exploit odds (30 days)1.2%top 30.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Nuclei

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmvite6.3.4GHSA-859w-5945-r5v3
npmvite6.2.7GHSA-859w-5945-r5v3
npmvite6.1.6GHSA-859w-5945-r5v3
npmvite5.4.19GHSA-859w-5945-r5v3
npmvite4.5.14GHSA-859w-5945-r5v3

Affected products (as reported)

VendorProductVersions
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

Weakness: CWE-22 · 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

References