Malicious Code Injection in indirect_cockroach_z3n Package
Summary
MAL-2025-94996: Malicious code in indirect_cockroach_z3n (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 indirect_cockroach_z3n package is part of the npm ecosystem, which is widely used for JavaScript package management. This package has been identified as part of a malicious campaign that aims to exploit the npm registry by flooding it with derivative packages. These packages are designed to inflate developer reputation scores through automated publishing scripts, which can lead to significant security risks for developers and users relying on these packages.
Vulnerability Detail
The vulnerability originates from the malicious intent behind the indirect_cockroach_z3n package, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior not only compromises the integrity of the npm registry but also poses a risk of dependency confusion and potential code execution vulnerabilities in applications that rely on these packages. The malicious payload continuously republishes variants, polluting the npm ecosystem and making it difficult for developers to trust package sources.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall indirect_cockroach_z3n
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 indirect_cockroach_z3n package and replace it with a trusted alternative. Additionally, consider using tools like Vulert to monitor your package dependencies for vulnerabilities. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The indirect_cockroach_z3n package poses a significant security risk due to its malicious behavior of modifying package files and flooding the npm registry. It is crucial for developers to remove this package from their projects and utilize tools like Vulert to monitor for vulnerabilities in their dependencies.
See every vulnerability recorded for indirect_cockroach_z3n →
FAQ
The indirect_cockroach_z3n package is an npm package that has been identified as part of a malicious campaign aimed at exploiting the npm registry.
The vulnerability can lead to dependency confusion, potential code execution, and compromise the integrity of your application by introducing malicious code.
You should uninstall the indirect_cockroach_z3n package immediately and replace it with a trusted alternative.
You can use tools like Vulert, which monitors your package-lock.json file to alert you in real-time for open-source vulnerabilities.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.