CVE-2025-31125: Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Affects viteSource GCVE Database
Exploited in the wild · KEV due 12 Feb 2026 · public detection template (Nuclei) : upgrade to 6.2.4 now.
Data as of 13 Nov 2026, 21:06 UTC
- KEV deadline
- US federal agencies must patch by this date; a sensible deadline for everyone else. Other KEV due dates
- Patch
- Available – fixed in 6.2.4
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:NExploitation evidence
t = 0 is the CVE’s publication on cve.org
Disclosed: evidence found.
CVE published 22 Jan 2026
Detectable: evidence found.
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: evidence found.
Listed in CISA KEV the same day as disclosure
Observed by OffSeq MirageSeen by Mirage: evidence found.
1 exposed host found; no attack traffic recorded
Timeline
CVE ID reserved
by GitHub, Inc.
, 302 days before disclosure
CVE published
on cve.org
, t = 0
In Threat Radar
record ingested
, 1 minute after disclosure
Added to CISA KEV (opens in a new tab)
exploitation confirmed
, the same day as disclosure
KEV remediation due
US federal deadline
, 21 days after disclosure
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), CISA KEV (opens in a new tab), OffSeq Mirage (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 13 Nov 2026.
What to do
Upgrade vite to 6.2.4.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Homebrewvitepkg:brew/viteOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade Vite to version 6.2.4 or later where this vulnerability is fixed. If upgrading is not immediately possible, avoid exposing the Vite development server to the network by not using the --host option or server.host configuration. No other mitigations are specified.
Description
A vulnerability in Vite versions from 2.5.1 up to but not including 6.2.4 allows an attacker to read arbitrary files on the server by bypassing the server.fs.deny restriction using crafted query parameters (?inline&import or ?raw?import). This issue affects only development servers explicitly exposed to the network via the --host option or server.host configuration. The vulnerability can leak base64-encoded file contents to the browser without requiring the /@fs/ prefix for files inside the project root. A fix is available in version 6.2.4.
References
- github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2025-31125 (opens in a new tab)
- github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 (opens in a new tab)
- github.com/vitejs/vite (opens in a new tab)
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125 (opens in a new tab)