CVE Tools

CVE-2025-31125

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

Exploited in the wild. In CISA KEV since 2026‑01‑22. A vendor fix is available.

Published Updated Sources: CVE.org, NVD, GitHub

What to do

The vendor has published a fix. Version details are below where the sources state them.

Steps

Written by AI from the record
  1. Check whether your organization runs Vite dev servers and whether they are reachable from outside your network (for example, whether you use --host or server.host, or otherwise publish the dev server).
  2. If the Vite dev server is internet-reachable, upgrade Vite to the fixed versions (at least one of: 6.2.4, 6.1.3, 6.0.13, 5.4.16, or 4.5.11).
  3. If you can’t upgrade immediately, do not expose the Vite dev server to the network and restrict access so it’s only reachable from trusted internal networks (or disable external access entirely) until the upgrade is complete.
  4. After upgrading, test that the externally reachable dev server (if you must keep one) no longer serves content from denied paths using the same kind of crafted URLs mentioned in the advisory.
npm install vite@6.2.4

What it is

From the CVE record

Vite is a frontend tooling framework for javascript. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.

In plain language

Written by AI from the record

CVE-2025-31125 is a Vite dev-server bug where a link can trick a user into making Vite reveal blocked files; if your small business has a Vite server reachable from the internet, you should fix it now.

Vite has a `server.fs.deny` bypass in the `?import` handling for `inline` and `raw`, letting an attacker trigger file disclosure by getting a user to open a crafted URL; this only matters when the Vite dev server is explicitly exposed to the network (for example via `--host` or `server.host`).

If you're affected

  • Sensitive local files exposure
  • System file disclosure risk
  • Customer data exposure
  • Legal/compliance incident risk

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS99th
Public exploit
CISA KEV
CISA KEV

Listed as exploited in the wild since 2026-01-22.

US federal agencies must remediate by 2026-02-12.

Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Public exploits

1 source with a proof of concept or module.

Exploit links, PoCs and Metasploit modules after sign-in
EPSS

65% chance of exploitation activity in the next 30 days, which ranks it in the 99th percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

The patch came 42 days before any public exploit.

  1. OpenVAS check added
  2. Public exploit / PoCsource: github-poc
  3. Nuclei check added
  4. Patch availablerecord updated
  5. Added to CISA KEV
  6. Publishedweakness classified, att&ck mapped

Affected products

Technical detail

CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N

Scored 5.3 by NVD.

How it is reached

  • Attack Vector NetworkExploitable remotely over the network without any special conditions
  • Attack Complexity HighRequires specific conditions like a race condition or non-default configuration
  • Privileges Required NoneNo authentication required — anyone can exploit this
  • User Interaction RequiredA user must click a link, open a file, or perform some action

Scope

  • Scope UnchangedImpact is limited to the vulnerable component itself

Impact if exploited

  • Confidentiality HighTotal information disclosure — all data in the component is compromised
  • Integrity NoneNo integrity impact
  • Availability NoneNo availability impact

Weaknesses

ATT&CK techniques

Mapped from the weaknesses above (CWE to ATT&CK), not observed in attacks.

Sources

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next exploited one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Vite, not every advisory. This one: actively exploited.

We use analytics cookies to see which pages and articles actually help people. Decline and none of them run — the site works the same. What we store