Malicious Code Detected in ca-npm-scripts Package - Security Alert
Summary
MAL-2025-16415: Malicious code in ca-npm-scripts (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
The ca-npm-scripts package is a Node.js library designed to facilitate the execution of npm scripts in a streamlined manner. It allows developers to automate tasks and manage scripts efficiently within their projects. However, the package has been identified to contain malicious code, posing significant security risks to users who integrate it into their applications.
Vulnerability Detail
The vulnerability in the ca-npm-scripts package stems from the inclusion of malicious code that can compromise the security of applications utilizing this package. This code may lead to unauthorized access, data breaches, or other harmful actions within the affected systems. The issue was introduced in version 0 and has been confirmed by security researchers.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall ca-npm-scripts
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 ca-npm-scripts package and manually execute npm scripts without relying on this library. This can be done by directly using npm commands in your terminal, such as: npm run <script-name>.
Conclusion
The discovery of malicious code in the ca-npm-scripts package highlights the importance of vigilance in managing open-source dependencies. Users are urged to remove this package from their projects and utilize secure alternatives to safeguard their applications.
See every vulnerability recorded for ca-npm-scripts →
FAQ
ca-npm-scripts is a Node.js library that helps automate the execution of npm scripts in development projects.
The malicious code can potentially allow unauthorized access and compromise the security of applications using the package.
You can use Vulert, which monitors open-source vulnerabilities in real-time. By analyzing your package-lock.json file, it alerts you to any vulnerabilities, including those in ca-npm-scripts.
Currently, there is no patched version of ca-npm-scripts available. It is advisable to remove the package entirely.
You should uninstall the ca-npm-scripts package immediately and replace it with a secure alternative.