Malicious Code Injection in violent_cobra_emerald-6: A Threat to npm Packages
Summary
MAL-2025-110563: Malicious code in violent_cobra_emerald-6 (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
violent_cobra_emerald-6 is an npm package that has been identified as part of a malicious campaign targeting the npm ecosystem. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores for token rewards. The malicious nature of this package poses significant risks to developers and users relying on npm for package management.
Vulnerability Detail
The vulnerability in violent_cobra_emerald-6 originates from its involvement in a token reward campaign that floods the npm registry with malicious packages. The package contains scripts that modify the package.json file to remove private flags, change version numbers, and generate random package names, leading to the continuous republishing of these variants. This behavior can pollute the npm registry, making it difficult for developers to find legitimate packages and potentially introducing security risks into their applications.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall violent_cobra_emerald-6
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 affected package and look for alternative packages that provide similar functionality without the associated risks. Always verify the integrity and reputation of packages before including them in your project.
Conclusion
The discovery of malicious code in violent_cobra_emerald-6 highlights the importance of vigilance when using open-source packages. Developers should take immediate action to remove the affected package and monitor their applications for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your software.
See every vulnerability recorded for violent_cobra_emerald-6 →
FAQ
violent_cobra_emerald-6 is an npm package identified as part of a malicious campaign that generates and publishes derivative packages to manipulate developer reputation scores.
The vulnerability can lead to the pollution of the npm registry, making it difficult to find legitimate packages and potentially introducing security risks into your application.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without requiring access to the code or installation.
If you have installed violent_cobra_emerald-6, you should uninstall it immediately using the command npm uninstall violent_cobra_emerald-6 and review your other dependencies for potential vulnerabilities.
Yes, you should look for alternative packages that provide similar functionality but do not have a history of malicious behavior. Always verify the reputation of packages before use.