CVE-2025-32395
vite: Vite has an `server.fs.deny` bypass with an invalid `request-target`
Overview
Description
Vite is a frontend tooling framework for javascript. Prior to 6.2.6, 6.1.5, 6.0.15, 5.4.18, and 4.5.13, the contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun. HTTP 1.1 spec (RFC 9112) does not allow # in request-target. Although an attacker can send such a request. For those requests with an invalid request-line (it includes request-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2. On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of http.IncomingMessage.url contains #. Vite assumed req.url won't contain # when checking server.fs.deny, allowing those kinds of requests to bypass the check. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) and running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun) are affected. This vulnerability is fixed in 6.2.6, 6.1.5, 6.0.15, 5.4.18, and 4.5.13.
Source: OX vulnerability database
Severity
6.5 · MEDIUM
CVSS 3.1 base score, scored by redhat.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness: CWE-200
Affected packages · 3
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| npm | vite | >=6.2.0, <6.2.6>=6.1.0, <6.1.5>=6.0.0, <6.0.15>=5.0.0, <5.4.18<4.5.13 | 6.2.66.1.56.0.155.4.184.5.13 |
| Seal npm | @seal-security/vite | >=4.4.11-sp1, <4.4.11-sp999>=5.3.5-sp1, <5.3.5-sp999 | 4.4.11-sp9995.3.5-sp999 |
| Seal npm | vite | >=4.4.11-sp0, <4.4.11-sp999>=5.3.5-sp0, <5.3.5-sp999 | 4.4.11-sp9995.3.5-sp999 |
Open a package to see all its vulnerabilities.
Operating systems · 3 fixes
chainguard 1 release · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| langfuse-2 | 2.95.12-r26 | |
| langfuse-fips-2 | 2.95.12-r28 |
minimos 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| trigger-dev | 4.5.11-r1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-32395
- github.com https://github.com/vitejs/vite
- github.com https://github.com/vitejs/vite/commit/175a83909f02d3b554452a7bd02b9f340cdfef70
- github.com https://github.com/vitejs/vite/security/advisories/GHSA-356w-63v5-8wf4
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-32395
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-32395
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.