CVE-2025-31125
Vite Vitejs · Vite Vitejs Improper Access Control Vulnerability
Actively exploited
What is CVE-2025-31125?
The Vitejs development tool contains an improper access control vulnerability. This flaw allows an unauthorized person to access and read the contents of files that should be restricted. By using specific import parameters, an attacker can bypass security controls and view sensitive data that was not intended to be public. This vulnerability is currently being exploited in the wild.
Administrators who configure their applications to expose the Vite development server to a network are at risk. This includes any setup that uses the host option to make the server accessible beyond the local machine. If your development environment is configured this way, you should apply the security update provided by the vendor immediately. Developers should ensure their server configurations follow secure practices to prevent unauthorized access to their internal files.
Summary written with AI assistance from the sources listed on this page. Check the original sources for full technical details.
CISA description
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.
CISA added this vulnerability to its Known Exploited Vulnerabilities catalog on 22 January 2026, which means there is reliable evidence that attackers are using it in real attacks.
What to do
Install the security update or apply the mitigations published by Vite as soon as possible. If no fix is available, follow the vendor's workaround or stop using the affected product until it can be patched. For internet-facing systems, also check for signs of compromise, because the flaw may have been used before you patched.