CVE-2025-31125
HIGH 7.5CVSS 3.1known exploitedVite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
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.
- Published
- 31 Mar 2025
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-200CWE-284
- Also known as
- GHSA-4r4m-qw57-chr8
- Sources
- NVDJSONCISA KEVJSONOSV GHSA-4r4m-qw57-chr8JSON
In CISA's Known Exploited Vulnerabilities catalog since 22 Jan 2026; US federal agencies must fix it by 12 Feb 2026.
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | vitejs | vitecpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* |
< 4.5.11 | 4.5.11 |
| NVD | vitejs | vitecpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* |
>= 5.0.0, < 5.4.16 | 5.4.16 |
| NVD | vitejs | vitecpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* |
>= 6.0.0, < 6.0.13 | 6.0.13 |
| NVD | vitejs | vitecpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* |
>= 6.1.0, < 6.1.3 | 6.1.3 |
| NVD | vitejs | vitecpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:* |
>= 6.2.0, < 6.2.4 | 6.2.4 |
| OSV | npm | vite | >= 6.2.0, < 6.2.4 | 6.2.4 |
| OSV | npm | vite | >= 6.1.0, < 6.1.3 | 6.1.3 |
| OSV | npm | vite | >= 6.0.0, < 6.0.13 | 6.0.13 |
| OSV | npm | vite | >= 5.0.0, < 5.4.16 | 5.4.16 |
| OSV | npm | vite | < 4.5.11 | 4.5.11 |
References
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 · Patch, WEB
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 · Exploit, Vendor Advisory, WEB
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125 · US Government Resource, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-31125 · ADVISORY
- https://github.com/vitejs/vite · PACKAGE
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 31 Mar 2025)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 31 Mar 2025)
- 25 Nov 2026 20:10 UTC · CISA KEV: first stored (published 22 Jan 2026)
- 22 Jan 2026 00:00 UTC · Listed as known exploited