Vite exposes non-allowed files via query parameters
CVE-2025-31125Known exploitedHigh
Vite's dev server allows attackers to read the contents of files that should not be accessible by using ?inline&import or ?raw?import query parameters. An attacker needs network access to a Vite dev server that has been explicitly configured to listen on the network using the --host or server.host option. This could allow an attacker to retrieve sensitive information from the application or server.
Plain English summary of the NVD and CISA text, checked by machine against both.
Scores and dates
- Added to KEV
- 22 Jan
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Detail
Vite Vitejs. CISA required action: Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.
Weakness: CWE-200 (opens in a new tab), CWE-284 (opens in a new tab)
Affected versions
- vitejs vite: before 4.5.11
- vitejs vite: from 5.0.0, before 5.4.16
- vitejs vite: from 6.0.0, before 6.0.13
- vitejs vite: from 6.1.0, before 6.1.3
- vitejs vite: from 6.2.0, before 6.2.4