Skip to main content
VulnerabilityPublished Updated

CVE-2025-31125: Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query

Affects viteSource GCVE Database

0
Compare
Authoritative record:CVE-2025-31125· Medium 5.3

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

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

t = 0 is the CVE’s publication on cve.org

  1. Disclosed: evidence found.

    CVE published 22 Jan 2026

  2. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  3. Exploited in the wild: evidence found.

    Listed in CISA KEV the same day as disclosure

  4. Observed by OffSeq Mirage: evidence found.

    1 exposed host found; no attack traffic recorded

Timeline

  1. CVE ID reserved

    by GitHub, Inc.

    , 302 days before disclosure

  2. CVE published

    on cve.org

    , t = 0

  3. In Threat Radar

    record ingested

    , 1 minute after disclosure

  4. , the same day as disclosure

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

ProductAffectedFixed in
Homebrewvitepkg:brew/viteOther threatsAffected
  • >=2.5.1 <6.2.4
Fixed in
  • 6.2.4

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

Community reviews

Loading reviews…