CVE-2025-31125: Vite Vitejs Improper Access Control Vulnerability
Reference page built from the source records below, each shown as its source publishes it. Dataset version ref-fe7ae74af9fa, updated 2026-11-02T23:39:54.475Z.
CISA Known Exploited Vulnerabilities
- Name
- Vite Vitejs Improper Access Control Vulnerability
- Vendor
- Vite
- Product
- Vitejs
- Added to the catalog
- 2026-01-22
- Due date for US federal agencies
- 2026-02-12
- Weaknesses
- CWE-200, CWE-284
- Catalog version
- 2026.10.30
Vite Vitejs contains an improper access control vulnerability that 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.
Required action (CISA)
Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Ransomware use: CISA does not mark known use of this vulnerability in ransomware campaigns.
Links in CISA's notes
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
- https://nvd.nist.gov/vuln/detail/CVE-2025-31125
Read on 2026-11-02T23:39:54.475Z under licence cisa-kev-cc0@b0067899 from https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json
NVD analysis
- Status
- Analyzed
- Published
- 2025-03-31T17:15:43.163
- Last modified
- 2026-06-17T09:09:54.040
- Weaknesses
- CWE-200, CWE-284, NVD-CWE-noinfo
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.
| Metric | Score | Severity | Vector | Scored by |
|---|---|---|---|---|
| CVSS 3.1 | 5.3 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N | [email protected] (Secondary) |
| CVSS 3.1 | 7.5 | HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | [email protected] (Primary) |
References
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949 (Patch)
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 (Exploit, Vendor Advisory)
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8 (Exploit, Vendor Advisory)
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125 (US Government Resource)
This product uses the NVD API but is not endorsed or certified by the NVD.
Read on 2026-11-02T23:42:22.836Z under licence nvd-api-terms-of-use@ff2a5288 from https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2025-31125
CVE record
- Title (CNA)
- Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
- Assigner
- GitHub_M
- State
- PUBLISHED
- Published
- 2025-03-31T17:06:30.704Z
- Updated
- 2026-01-23T16:58:37.048Z
- Problem types
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor; CWE-284: Improper Access Control
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.
References
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
Read on 2026-11-03T02:15:58.628Z under licence cve-terms-of-use@81bfa2f3 from https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2025/31xxx/CVE-2025-31125.json
GitHub Advisory Database
GHSA-4r4m-qw57-chr8: Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
- Severity (GitHub)
- medium
- CVSS
- 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N
- Weaknesses
- CWE-200, CWE-284
- Published
- 2025-03-31T17:31:54Z
- Updated
- 2026-01-22T21:47:41Z
- npm vite: affected >= 6.2.0, < 6.2.4, first patched 6.2.4
- npm vite: affected >= 6.1.0, < 6.1.3, first patched 6.1.3
- npm vite: affected >= 6.0.0, < 6.0.13, first patched 6.0.13
- npm vite: affected >= 5.0.0, < 5.4.16, first patched 5.4.16
- npm vite: affected < 4.5.11, first patched 4.5.11
### Summary
The contents of arbitrary files can be returned to the browser.
### Impact
Only apps explicitly exposing the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.
### Details
- base64 encoded content of non-allowed files is exposed using `?inline&import` (originally reported as `?import&?inline=1.wasm?init`)
- content of non-allowed files is exposed using `?raw?import`
`/@fs/` isn't needed to reproduce the issue for files inside the project root.
### PoC
Original report (check details above for simplified cases):
The ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists. Base64 decoding needs to be performed twice
```
$ npm create vite@latest
$ cd vite-project/
$ npm install
$ npm run dev
```
Example full URL `http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init`
Read on 2026-11-03T05:52:37.476Z under licence ghsa-cc-by-4.0@9e5f1b3c from https://api.github.com/advisories/GHSA-4r4m-qw57-chr8
Also known as / affected packages
GHSA-4r4m-qw57-chr8
Also known as: CVE-2025-31125. OSV.dev record, GitHub advisory.
- npm vite: introduced 6.2.0, fixed 6.2.4
- npm vite: introduced 6.1.0, fixed 6.1.3
- npm vite: introduced 6.0.0, fixed 6.0.13
- npm vite: introduced 5.0.0, fixed 5.4.16
- npm vite: introduced 0, fixed 4.5.11
Read on 2026-11-03T02:49:11.461Z under licence ghsa-cc-by-4.0@9e5f1b3c from https://api.osv.dev/v1/vulns/GHSA-4r4m-qw57-chr8
Defensive techniques (MITRE D3FEND)
D3FEND maps these defensive techniques to the weakness (CWE) that NVD lists for this CVE, through the digital artifacts the weakness affects. D3FEND does not say they stop this vulnerability.
CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
D3FEND lists no defensive technique for this weakness.
D3FEND ontology version 1.6.0.
Read on 2026-11-02T23:55:11.729Z under licence d3fend-terms-of-use@f98cbc7e from https://d3fend.mitre.org/api/weakness/cwe/CWE-200.json
CWE-284: Improper Access Control
- Harden: Software Update (acts on Software)
- Harden: Agent Authentication (acts on User Account)
- Harden: Change Default Password (acts on User Account)
- Harden: Trusted Library (acts on Subroutine)
- Restore: Restore Software (acts on Software)
- Harden: Domain Logic Validation (acts on Subroutine)
- Model: Software Inventory (acts on Software)
- Restore: Unlock Account (acts on User Account)
- Restore: Restore User Account Access (acts on User Account)
- Evict: Account Locking (acts on User Account)
- Isolate: Application-based Process Isolation (acts on Subroutine)
- Harden: Variable Initialization (acts on Subroutine)
- Harden: Credential Scrubbing (acts on Subroutine)
- Model: Asset Vulnerability Enumeration (acts on Software)
- Isolate: User Account Permissions (acts on User Account)
- Model: Access Modeling (acts on User Account)
D3FEND ontology version 1.6.0.
Read on 2026-11-02T23:55:41.179Z under licence d3fend-terms-of-use@f98cbc7e from https://d3fend.mitre.org/api/weakness/cwe/CWE-284.json
MITRE D3FEND™ knowledge graph. © 2025 The MITRE Corporation.
"The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use D3FEND for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy." Terms: https://d3fend.mitre.org/tou/
Sources and licences
CISA
Source: CISA Catalog of Known Exploited Vulnerabilities, version 2026.10.30, CC0 1.0. Use of this data does not imply endorsement by CISA or DHS.
National Vulnerability Database (NIST)
This product uses the NVD API but is not endorsed or certified by the NVD.
NVD API Terms of Use (NIST publications in the public domain, 17 U.S.C. 105)
CVE Program, The MITRE Corporation
Copyright © 1999-2026, The MITRE Corporation. CVE is a trademark and the CVE logo is a registered trademark of The MITRE Corporation. CVE Usage: MITRE hereby grants you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Common Vulnerabilities and Exposures (CVE™). Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy.
GitHub Advisory Database
Source: GitHub Advisory Database, https://github.com/advisories/GHSA-4r4m-qw57-chr8, licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changes: fields selected and reformatted by ransomware-tracker.com.
GitHub Advisory Database via OSV.dev
GHSA-4r4m-qw57-chr8: GitHub Advisory Database, https://github.com/advisories/GHSA-4r4m-qw57-chr8. Licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), provided as is, without warranties. Retrieved via OSV.dev (https://osv.dev/vulnerability/GHSA-4r4m-qw57-chr8), which enriches records; fields selected and reformatted by ransomware-tracker.com.
MITRE D3FEND
MITRE D3FEND™ knowledge graph. © 2025 The MITRE Corporation.
"The MITRE Corporation (MITRE) hereby grants you a non-exclusive, royalty-free license to use D3FEND for research, development, and commercial purposes. Any copy you make for such purposes is authorized provided that you reproduce MITRE's copyright designation and this license in any such copy." Terms: https://d3fend.mitre.org/tou/MITRE D3FEND Terms of Use (site + knowledge graph); source repo MIT
Cite this page
Dragons Eye Ransomware Tracker, "CVE-2025-31125: Vite Vitejs Improper Access Control Vulnerability",
entity page, dataset version ref-fe7ae74af9fa, updated 2026-11-02T23:39:54.475Z,
https://ransomware-tracker.com/cve/CVE-2025-31125 (accessed 2026-11-03).
Underlying source: CISA Catalog of Known Exploited Vulnerabilities, version 2026.10.30.
Underlying source: National Vulnerability Database (NIST), CVE API 2.0, record last modified 2026-06-17T09:09:54.040.
Underlying source: CVE List (CVE Program, The MITRE Corporation), record updated 2026-01-23T16:58:37.048Z.
Underlying source: GitHub Advisory Database, GHSA-4r4m-qw57-chr8, updated 2026-01-22T21:47:41Z.
Underlying source: GitHub Advisory Database, GHSA-4r4m-qw57-chr8, via OSV.dev, modified 2026-09-10T03:50:56.858424937Z.
Underlying source: MITRE D3FEND, ontology version 1.6.0.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.