Critical Malicious Code Vulnerability in lint-staged-imagemin Package
Summary
MAL-2025-191124: Malicious code in lint-staged-imagemin (npm). Affects lint-staged-imagemin versions 1.3.1 – 1.3.2. 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
lint-staged-imagemin is an npm package designed to optimize images in a staging environment before they are committed to a repository. It helps developers maintain image quality while reducing file sizes, thereby improving application performance. However, this package has been compromised, embedding 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 lint-staged-imagemin package, specifically in versions 1.3.1 and 1.3.2. This code can fully compromise any computer that has the package installed, allowing unauthorized access to sensitive information such as secrets and keys. The implications of this vulnerability are severe, as it may lead to data breaches and unauthorized control over affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall lint-staged-imagemin
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 and ensuring that all sensitive information is secured. It is advisable to monitor the system for any unusual activity following the removal of the package.
Conclusion
The lint-staged-imagemin package has been compromised, embedding malicious code that poses a significant threat to any system using it. Immediate action is required to remove the package and secure sensitive information. Regular monitoring of dependencies is essential to prevent future vulnerabilities.
See every vulnerability recorded for lint-staged-imagemin →
FAQ
Immediately remove the package 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 any signup.
Failing to address this vulnerability can lead to unauthorized access to sensitive data and potential control over your system by malicious actors.
Currently, there is no patched version available. The best course of action is to remove the package entirely.
Regularly monitor your dependencies for vulnerabilities using tools like Vulert, which can alert you in real-time for open-source vulnerabilities.