CVE-2025-31125KEV · OVERDUECWE-200CWE-284

Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query

Medium · published March 31, 2025

Patch now

The score understates this — it's already being exploited

CVSS calls it medium at 5.3. It is confirmed in active exploitation. It sits in the 99.3th percentile for exploit probability.

255
days past CISA
deadline
CVSS v3.1
5.3
EPSS
66%
Percentile
99.3
In the wild
Confirmed
What it is

⚠️ A sneak peek into your files! Vite’s dev server might be exposing sensitive files when certain options are enabled — a highway to your data! Imagine a delivery service that mistakenly leaves packages out in the open, visible to anyone passing by. This vulnerability in Vite could allow unauthorized users to peek at confidential files, just like that careless delivery driver. If you're exposing your Vite dev server to the network, an attacker could exploit this vulnerability to access non-allowed files. This could lead to the leakage of sensitive information or configuration details — absolutely devastating for your application's security!

Put simply

Imagine a delivery service that mistakenly leaves packages out in the open, visible to anyone passing by. This vulnerability in Vite could allow unauthorized users to peek at confidential files, just like that careless delivery driver. This vulnerability allows attackers to access restricted file content through the Vite server when using the `?inline&import` or `?raw?import` query parameters, specifically on apps that have the server accessible externally.

What to do

If you're exposing your Vite dev server to the network, an attacker could exploit this vulnerability to access non-allowed files. This could lead to the leakage of sensitive information or configuration details — absolutely devastating for your application's security! Update to Vite version 6.2.4, 6.1.3, 6.0.13, 5.4.16, or 4.5.11 to patch this vulnerability. Additionally, ensure that your server is not exposed unnecessarily by avoiding the `--host` or `server.host` config options unless absolutely required. You’ve got this! Secure your server and keep that data safe! 🛡️

The record
Technical detail
CVSS v3.1
5.3 · MEDIUM
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
CVSS v4.0
Not supplied
EPSS
0.65756 · 99.3th percentile
Weaknesses
CWE-200 · Exposure of Sensitive Information to an Unauthorized Actor; CWE-284 · Improper Access Control
Published
2025-03-31T17:06Z
KEV added
2026-01-22 · due 2026-02-12
EPSS history
Timeline
  • 22 JAN 00:00Z
    Added to CISA KEV — remediate by Feb 12
    kev
  • 31 MAR 17:06Z
    Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
    cvelistv5