Critical Malicious Code Vulnerability in vite-postcss-tools Package
Summary
MAL-2025-5967: Malicious code in vite-postcss-tools (npm). Affects vite-postcss-tools versions 0.0.2 – 0.0.4. 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-tools 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 seamlessly within their Vite projects, enhancing CSS processing capabilities. However, this package has been identified to contain malicious code that compromises the security of systems using it.
Vulnerability Detail
The vulnerability stems from the presence of embedded malicious code within the vite-postcss-tools package. This code can lead to complete system compromise for any computer that has the package installed. Attackers may gain unauthorized access to sensitive information, including secrets and keys stored on the affected system. The malicious nature of this code poses significant risks, as it may not only affect the immediate environment but could also lead to further exploitation of connected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall vite-postcss-tools
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 temporary measure, you can avoid using the vite-postcss-tools package until a secure version is released. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The vite-postcss-tools 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 affected systems. Stay vigilant and consider using tools like Vulert to monitor your dependencies for vulnerabilities.
See every vulnerability recorded for vite-postcss-tools →
FAQ
Immediately remove the vite-postcss-tools package from your project and consider rotating all secrets and keys 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 requiring any signup.
The best mitigation strategy is to remove the package entirely and look for alternative solutions until a secure version is released.
Failure to address this vulnerability could lead to unauthorized access to sensitive data, system compromise, and potential exploitation of other connected systems.
Utilize tools like Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software using just package-lock.json.