Malicious Code Injection in catch-bash-string-long-catch Package
Summary
MAL-2025-186036: Malicious code in catch-bash-string-long-catch (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 catch-bash-string-long-catch package is part of the npm ecosystem, primarily used for various utility functions in JavaScript applications. However, it has been identified as part of a malicious campaign that floods the npm registry with harmful packages. This package, like others in the campaign, is designed to manipulate npm's publishing system, leading to potential security risks for developers and users relying on it.
Vulnerability Detail
The vulnerability originates from a malicious payload embedded within the catch-bash-string-long-catch package. This payload modifies the package.json file to remove private flags, alters version numbers, and generates random package names, which can lead to the proliferation of harmful packages in the npm registry. The ramifications include the potential for developers to unknowingly install compromised packages, leading to security breaches, data leaks, or further exploitation of their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall catch-bash-string-long-catch
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 workaround, you can avoid using the catch-bash-string-long-catch package until a secure version is released. Additionally, you can monitor your project for vulnerabilities using tools like Vulert. With Vulert, you can check your package-lock.json file to identify if your application is affected by this vulnerability. You can access the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The catch-bash-string-long-catch package has been identified as containing malicious code that can compromise applications using it. It is crucial for developers to update this package and monitor their dependencies to ensure the security of their applications.
See every vulnerability recorded for catch-bash-string-long-catch →
FAQ
It is an npm package used for utility functions in JavaScript applications, but it has been compromised with malicious code.
The vulnerability can lead to the installation of compromised packages, which may result in security breaches or data leaks.
You can use Vulert to monitor your package-lock.json file for vulnerabilities related to the catch-bash-string-long-catch package.
Immediately update the package to the latest secure version using npm update catch-bash-string-long-catch.
Regularly monitor your dependencies using tools like Vulert and keep your packages updated to the latest secure versions.