Overview
Recently, NSFOCUS CERT detected that Vite issued a security bulletin to fix the Vite arbitrary file read vulnerability (CVE-2025-31125); Because the Vite development server does not strictly verify the path when processing URL requests, unauthenticated attackers can bypass path access restrictions by constructing special URLs and read arbitrary files on the target server. At present, the vulnerability details and PoC have been made public. Relevant users are requested to take measures to protect themselves as soon as possible.
NSFOCUS has successfully reproduced this vulnerability:


Reference link: https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8
Scope of Impact
Affected versions
- 6.2.0 <= Vite <= 6.2.3
- 6.1.0 <= Vite <= 6.1.2
- 6.0.0 <= Vite <= 6.0.12
- 5.0.0 <= Vite <= 5.4.15
- Vite <= 4.5.10
Note: Affects applications that expose the Vite development server to the network (enable –host or configure server.host).
Unaffected version
- Vite >= 6.2.4
- 6.1.3 <= Vite < 6.2.0
- 6.0.13 <= Vite < 6.1.0
- 5.4.16 <= Vite < 6.0.0
- 4.5.11 <= Vite < 5.0.0
Detection
Manual detection
Relevant users can check whether the current Vite version is affected by this vulnerability to troubleshoot whether the current service is affected. The following command can be used to view the global installation through npm:

User can also run the vite -v command directly in the terminal command line to view:

Tool detection
NSFOCUS Automated Penetration Testing Tool (EZ) has supported Vite’s fingerprint recognition and CVE-2025-31125 vulnerability risk detection (Note: For the enterprise version, please contact NSFOCUS sales staff to obtain it).
Users can use the following command to detect vulnerabilities:
./ez webscan –pocs vite -u https:192.168.1.41:443/ |

Tool download link: https://github.com/m-sec-org/EZ/releases
Product Testing
The NSFOCUS Remote Security Assessment System (RSAS) has the ability to scan and detect this vulnerability. Users who have deployed the above equipment are requested to upgrade to the latest version.
Upgrade package version No. | Upgrade package download link | |
RSAS V6 system plug-in package | V6.0R02F01.3911 | https://update.nsfocus.com/update/listRsasDetail/v/vulsys |
For RSAS upgrade configuration guidance, please refer to the following link: https://update.nsfocusglobal.com/update/listRsas
Risk Investigation of Exposure Surface
Cloud detection
NSFOCUS External Attack Surface Management Service (EASM) supports the Internet asset investigation of CVE-2025-31125 vulnerability risks. It has helped service customer groups complete exposure surface investigation and risk verification, and timely conducts vulnerability warning and closed-loop disposal before threats occur.
Interested customers can arrange detailed consultation and communication by contacting their local regional colleagues at NSFOCUS or sending an email to rs@nsfocus.com.
Local detection
NSFOCUS CTEM solution can support the active discovery and troubleshooting of Vite-related assets and CVE-2025-31125 vulnerability risks:
Users use the external attack surface discovery function to synchronize CVE-2025-31125 vulnerability clues to the cloud, and obtain the affected assets of the target unit through asset mapping by fingerprint recognition or PoC scanning, it also supports calling various vulnerability scanning devices.
Mitigation
Official upgrade
At present, the official has released a new version to fix this vulnerability. Affected users are requested to upgrade their protection as soon as possible. Download link: https://github.com/vitejs/vite/releases
Temporary protective measures
If the relevant users are temporarily unable to perform upgrade operations, they can be temporarily alleviated by restricting access to the Vite development server without affecting their business.
Statement
This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.
About NSFOCUS
NSFOCUS, a pioneering leader in cybersecurity, is dedicated to safeguarding telecommunications, Internet service providers, hosting providers, and enterprises from sophisticated cyberattacks.
Founded in 2000, NSFOCUS operates globally with over 4000 employees at two headquarters in Beijing, China, and Santa Clara, CA, USA, and over 50 offices worldwide. It has a proven track record of protecting over 25% of the Fortune Global 500 companies, including four of the five largest banks and six of the world’s top ten telecommunications companies.
Leveraging technical prowess and innovation, NSFOCUS delivers a comprehensive suite of security solutions, including the Intelligent Security Operations Platform (ISOP) for modern SOC, DDoS Protection, Continuous Threat Exposure Management (CTEM) Service and Web Application and API Protection (WAAP). All the solutions and services are augmented by the Security Large Language Model (SecLLM), ML, patented algorithms and other cutting-edge research achievements developed by NSFOCUS.