Skip to content
OpenAdvisories
Medium · 6.0 Scanner template CVE-2025-46565 EUVD-2025-12770GHSA-859w-5945-r5v3

Vite's server.fs.deny bypassed with /. for files under project root

Published May 1, 2025 · Updated May 2, 2025 · 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.

Affected products

VendorProductAffectedFixed
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 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling vite 6.3.4-r0 —

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
npm vite >= 6.3.0, < 6.3.4 6.3.4 GHSA-859w-5945-r5v3
npm vite >= 6.2.0, < 6.2.7 6.2.7 GHSA-859w-5945-r5v3
npm vite >= 6.0.0, < 6.1.6 6.1.6 GHSA-859w-5945-r5v3
npm vite >= 5.0.0, < 5.4.19 5.4.19 GHSA-859w-5945-r5v3
npm vite < 4.5.14 4.5.14 GHSA-859w-5945-r5v3

References