Critical Malicious Code Vulnerability in vite-plugin-crypto Package
Summary
MAL-2026-17222: Malicious code in vite-plugin-crypto (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-crypto is an npm package designed to provide cryptographic functionalities for web applications. It allows developers to easily integrate encryption and decryption features into their projects. However, this package has been compromised, leading to the inclusion of malicious code that poses significant security risks to any system using it.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the vite-plugin-crypto package. Any system that has this package installed is considered fully compromised, allowing attackers to potentially access sensitive information, including secrets and keys stored on the affected computer. The malicious code can lead to unauthorized control over the system, making it imperative for users to take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall vite-plugin-crypto
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
As a workaround, it is recommended to rotate all secrets and keys stored on the affected computer immediately from a different, secure machine. This ensures that any compromised credentials are no longer usable.
Conclusion
The vite-plugin-crypto package has been compromised with malicious code, posing serious security risks to any system using it. Immediate action is required to remove the package and secure sensitive information. Users should monitor for updates and consider using tools like Vulert to stay informed about vulnerabilities in their dependencies.
See every vulnerability recorded for vite-plugin-crypto →
FAQ
You should immediately remove the vite-plugin-crypto package from your project and rotate any sensitive information stored on the affected system.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
Failing to address this vulnerability can lead to unauthorized access to sensitive data and complete control of your system by malicious actors.
The best mitigation is to remove the package entirely and rotate any compromised secrets. There are no safe workarounds while the package remains installed.
If a patched version is released, updating the package may resolve the issue. However, it is recommended to remove the package entirely due to the severity of the compromise.