Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query
CISA confirma la explotación de esta vulnerabilidad en ataques reales. Prioriza comprobar si afecta a tu aplicación. CISA KEV · CC0 1.0
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
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | 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 | 6.2.4, 6.1.3, 6.0.13, 5.4.16, 4.5.11 |
Referencias
- https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
- https://nvd.nist.gov/vuln/detail/CVE-2025-31125
- https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949
- https://github.com/vitejs/vite
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125
- Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N- Debilidad (CWE)
CWE-200, CWE-284- Plataforma
- npm
- Paquete
vite- Publicada
- 31.03.2025
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-4r4m-qw57-chr8 - CC BY 4.0
Historial de vulnerabilidades: vite
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 27
- Primera → última
- 08.2022 10.2026
- Sin corrección
- 0
- Explotada en ataques
- 1
Distribución por gravedad
- Alta 8
- Media 16
- Baja 3
Divulgaciones por año
- 2022: 1
- 2023: 2
- 2024: 4
- 2025: 9
- 2026: 11
-
Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.