CVE-2025-31125
Vite 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
Vite 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.
- Record
CVE-2025-31125- 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 - Weakness
- CWE-200, CWE-284
- Updated
- 2026-11-02
EUVDEUVD-2025-8866
5.3
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.
- Record
EUVD-2025-8866- 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-4r4m-qw57-chr8
5.3
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
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) 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
- Record
GHSA-4r4m-qw57-chr8- 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 - Weakness
- CWE-200, CWE-284
- Updated
- 2026-11-02
CISA KEV No score
Vite Vitejs Improper Access Control Vulnerability
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.
- Record
CVE-2025-31125- Weakness
- CWE-200, CWE-284
- Updated
- 2026-11-02
NVD
5.3
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.
- Record
CVE-2025-31125- 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 - 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 - Weakness
- CWE-200, CWE-284
- Updated
- 2026-11-02
OSV
5.3
Vite 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.
- Record
CVE-2025-31125- 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 - Weakness
- CWE-200, CWE-284
- Updated
- 2026-11-04
Show 11 moreShow less
OSVGHSA-4r4m-qw57-chr8
5.3
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
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) 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
- Record
GHSA-4r4m-qw57-chr8- 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 - Weakness
- CWE-200, CWE-284
- Updated
- 2026-11-02
OSVCLSA-2026-1775176118 No score
TuxCare security update for vite (6 CVEs)
TuxCare rebuilt vite to address 6 CVEs. Fixed in 4.5.5-tuxcare.1.
- Record
CLSA-2026-1775176118- Updated
- 2026-11-02
OSVCLSA-2026-1777249675 No score
TuxCare security update for vite (4 CVEs)
TuxCare rebuilt vite to address 4 CVEs. Fixed in 5.4.14-tuxcare.2.
- Record
CLSA-2026-1777249675- Updated
- 2026-11-02
OSVCLSA-2026-1777509608 No score
TuxCare security update for vite (11 CVEs)
TuxCare rebuilt vite to address 11 CVEs. Fixed in 2.9.18-tuxcare.1.
- Record
CLSA-2026-1777509608- Updated
- 2026-11-02
OSVCLSA-2026-1777509610 No score
TuxCare security update for vite (6 CVEs)
TuxCare rebuilt vite to address 6 CVEs. Fixed in 3.2.11-tuxcare.1.
- Record
CLSA-2026-1777509610- Updated
- 2026-11-02
OSVCLSA-2026-1789031855 No score
TuxCare security update for vite (16 CVEs)
TuxCare rebuilt vite to address 16 CVEs. Fixed in 4.1.5-tuxcare.1.
- Record
CLSA-2026-1789031855- Updated
- 2026-11-02
OSVCLSA-2026-1790801785 No score
TuxCare security update for vite (3 CVEs)
TuxCare rebuilt vite to address 3 CVEs. Fixed in 5.0.12-tuxcare.1.
- Record
CLSA-2026-1790801785- Updated
- 2026-11-02
OSVCLSA-2026-1790803771 No score
TuxCare security update for vite (3 CVEs)
TuxCare rebuilt vite to address 3 CVEs. Fixed in 4.5.0-tuxcare.1.
- Record
CLSA-2026-1790803771- Updated
- 2026-11-02
OSVCLSA-2026-1790804788 No score
TuxCare security update for vite (2 CVEs)
TuxCare rebuilt vite to address 2 CVEs. Fixed in 5.4.10-tuxcare.1.
- Record
CLSA-2026-1790804788- Updated
- 2026-11-02
OSVCLSA-2026-1792225950 No score
TuxCare security update for @vitejs/plugin-react (11 CVEs)
TuxCare rebuilt @vitejs/plugin-react to address 11 CVEs. Fixed in 2.9.18-tuxcare.1.
- Record
CLSA-2026-1792225950- Updated
- 2026-11-02
OSVCLSA-2026-1792225952 No score
TuxCare security update for @vitejs/plugin-react (6 CVEs)
TuxCare rebuilt @vitejs/plugin-react to address 6 CVEs. Fixed in 3.2.11-tuxcare.1.
- Record
CLSA-2026-1792225952- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
vitenpm |
6.2.0 up to 6.2.4 | 6.2.4 |
vitenpm |
6.1.0 up to 6.1.3 | 6.1.3 |
vitenpm |
6.0.0 up to 6.0.13 | 6.0.13 |
vitenpm |
5.0.0 up to 5.4.16 | 5.4.16 |
vitenpm |
before 4.5.11 | 4.5.11 |
viteTuxCare:npm From an advisory covering 6 CVEs |
4.5.5-tuxcare.0 up to 4.5.5-tuxcare.1, plus listed versions 4.5.5 |
4.5.5-tuxcare.1 |
viteTuxCare:npm From an advisory covering 4 CVEs |
5.4.14-tuxcare.0 up to 5.4.14-tuxcare.2, plus listed versions 5.4.145.4.14-tuxcare.1 |
5.4.14-tuxcare.2 |
viteTuxCare:npm From an advisory covering 11 CVEs |
2.9.18-tuxcare.0 up to 2.9.18-tuxcare.1, plus listed versions 2.9.18 |
2.9.18-tuxcare.1 |
viteTuxCare:npm From an advisory covering 6 CVEs |
3.2.11-tuxcare.0 up to 3.2.11-tuxcare.1, plus listed versions 3.2.11 |
3.2.11-tuxcare.1 |
viteTuxCare:npm From an advisory covering 16 CVEs |
4.1.5-tuxcare.0 up to 4.1.5-tuxcare.1, plus listed versions 4.1.5 |
4.1.5-tuxcare.1 |
Show 5 moreShow less
| Package | Affected | Fixed |
|---|---|---|
viteTuxCare:npm From an advisory covering 3 CVEs |
5.0.12-tuxcare.0 up to 5.0.12-tuxcare.1, plus listed versions 5.0.12 |
5.0.12-tuxcare.1 |
viteTuxCare:npm From an advisory covering 3 CVEs |
4.5.0-tuxcare.0 up to 4.5.0-tuxcare.1, plus listed versions 4.5.0 |
4.5.0-tuxcare.1 |
viteTuxCare:npm From an advisory covering 2 CVEs |
5.4.10-tuxcare.0 up to 5.4.10-tuxcare.1, plus listed versions 5.4.10 |
5.4.10-tuxcare.1 |
@vitejs/plugin-reactTuxCare:npm From an advisory covering 11 CVEs |
2.9.18-tuxcare.0 up to 2.9.18-tuxcare.1, plus listed versions 2.9.18 |
2.9.18-tuxcare.1 |
@vitejs/plugin-reactTuxCare:npm From an advisory covering 6 CVEs |
3.2.11-tuxcare.0 up to 3.2.11-tuxcare.1, plus listed versions 3.2.11 |
3.2.11-tuxcare.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | sunhuiHi666/CVE-2025-31125 | 2025-04-01 |
| PoC in GitHub | MuhammadWaseem29/Vitejs-exploit | 2025-05-03 |
| PoC in GitHub | 0xgh057r3c0n/CVE-2025-31125 | 2025-05-07 |
| PoC in GitHub | harshgupptaa/Path-Transversal-CVE-2025-31125- | 2025-07-13 |
| Nuclei | Vite Development Server - Path Traversal |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | OSV | |
| exploitation, exploits | ||
| first indexed | CVE List, EUVD, GitHub Advisories, CISA KEV, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-31125 is a medium vulnerability (CVSS 5.3) in Vitejs Vite, published March 31, 2025. CISA lists it as known to be exploited, since January 22, 2026. EUVD reports exploitation since January 22, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 74.9%, the 99th percentile. Fixed in vite 6.2.4.
References
github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125
nvd.nist.gov/vuln/detail/CVE-2025-31125
github.com/advisories/GHSA-4r4m-qw57-chr8
github.com/CVEProject/cvelistV5/tree/main/cves/2025/31xxx/CVE-2025-31125.json
github.com/vitejs/vite