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.
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- Check whether your organization runs Vite dev servers and whether they are reachable from outside your network (for example, whether you use
--hostorserver.host, or otherwise publish the dev server). - 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).
- 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.
- 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.4What 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 recordCVE-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.
- 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.
- OpenVAS check added
- Public exploit / PoCsource: github-poc
- Nuclei check added
- Patch availablerecord updated
- Added to CISA KEV
- Publishedweakness classified, att&ck mapped
Affected products
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS: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
References in the record
- github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
- github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
- nvd.nist.gov/vuln/detail/CVE-2025-31125
And 2 more references. See all after sign-in
In the news
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.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI