Critical Malicious Code Vulnerability in vite-plugin-reactjs-refresh
Summary
MAL-2025-6377: Malicious code in vite-plugin-reactjs-refresh (npm). Affected versions are not published. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
vite-plugin-reactjs-refresh is an npm package designed to enhance the development experience for React applications by enabling fast refresh capabilities. It allows developers to see changes in real-time without losing the component state. However, this package has been identified to contain malicious code that compromises the security of any system where it is installed.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the vite-plugin-reactjs-refresh package. This code can lead to complete system compromise, allowing unauthorized access to sensitive information such as secrets and keys stored on the affected machine. The malicious nature of this code is classified under CWE-506, indicating that it appears to be intentionally harmful. Users should be aware that simply removing the package may not eliminate all traces of the malicious software, as full control of the system may have been granted to an external entity.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall vite-plugin-reactjs-refresh
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
There are no effective workarounds for this vulnerability other than removing the package entirely and ensuring that no remnants of the malicious code remain on the system.
Conclusion
The vite-plugin-reactjs-refresh package has been identified as containing malicious code that poses a significant security risk. Immediate action is required to remove the package and secure any sensitive information. Users are encouraged to utilize tools like Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for vite-plugin-reactjs-refresh →
FAQ
You should remove the package immediately and rotate any sensitive information stored on your system.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
Keeping this package installed can lead to unauthorized access to your system, potentially compromising sensitive data and allowing malicious actors to control your machine.
After removing the package, it is essential to rotate all secrets and keys stored on the affected system. However, there is no guarantee that all malicious software has been removed.
If a patched version is released, updating the package will fix the vulnerability. Always ensure to check for updates regularly.