Vulnerabilities / CVE-2025-31125
CVE-2025-31125
Published 2025-03-31 · published (not yet in NVD)
CVE-2025-31125
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
Exploited in the wild: CISA added it to the Known Exploited Vulnerabilities catalog on 2026-01-22, with a fix-by date of 2026-02-12. Patch it first.
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
5.3 MEDIUM
CVSS 3.1 · CNA
CVSS 3.1 · CNA
75%
chance of exploitation in the next 30 days (EPSS; in the top 1% of all CVEs)
chance of exploitation in the next 30 days (EPSS; in the top 1% of all CVEs)
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.
Scores
Affected packages and fixed versions
| Package | Ecosystem | Fixed in |
|---|---|---|
| vite | npm | 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 |
Affected products
- vitejs vite: >= 6.2.0, < 6.2.4; >= 6.1.0, < 6.1.3; >= 6.0.0, < 6.0.13; >= 5.0.0, < 5.4.16; < 4.5.11
Also known as: GHSA-4r4m-qw57-chr8
2 references (advisories, patches, write-ups)
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 · x_refsource_CONFIRM
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 · x_refsource_MISC
Sources: CVE.org, OSV.dev, FIRST EPSS. Missing ones did not answer or have no record yet.