Critical Malicious Code Vulnerability in vite-postcss-kit Package
Summary
MAL-2025-6378: Malicious code in vite-postcss-kit (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-postcss-kit is an npm package designed to facilitate the integration of PostCSS with Vite, a modern frontend build tool. It allows developers to utilize PostCSS plugins to enhance their CSS workflow. However, this package has been identified to contain malicious code, posing significant security risks to any system utilizing it.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the vite-postcss-kit package. This code can compromise the security of any computer that has the package installed or running, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious nature of the code is classified under CWE-506, indicating that it appears to be intentionally harmful. Users are advised to treat any system with this package as fully compromised.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall vite-postcss-kit
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
Currently, the best workaround is to uninstall the vite-postcss-kit package immediately. You can do this by running the following command in your terminal: npm uninstall vite-postcss-kit. Additionally, consider rotating any secrets or keys stored on the affected system from a secure, unaffected environment.
Conclusion
The vite-postcss-kit package has been identified as containing malicious code, posing a significant security threat. Immediate action is required to uninstall the package and secure any sensitive information. Users are encouraged to utilize tools like Vulert to monitor their dependencies for vulnerabilities.
See every vulnerability recorded for vite-postcss-kit →
FAQ
You should uninstall the vite-postcss-kit package immediately and rotate any sensitive information stored on your 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, complete system compromise, and potential data breaches.
Yes, you can use Vulert, which monitors and alerts you in real-time for open-source vulnerabilities in your software by analyzing your package-lock.json.
While removing the package is essential, there is no guarantee that all malicious software resulting from its installation will be removed. A thorough security audit of your system is recommended.