Malicious Code Injection in modern_cobra_z3n Package
Summary
MAL-2025-105929: Malicious code in modern_cobra_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 modern_cobra_z3n package is part of the npm ecosystem, which is widely used for JavaScript package management. This package is associated with the tea.xyz token reward campaign, which has been known to flood npm with malicious packages. The primary function of this package, like many others in the campaign, is to manipulate npm's publishing system to inflate developer reputation scores for token rewards.
Vulnerability Detail
The vulnerability in the modern_cobra_z3n package stems from its inclusion in a malicious campaign that employs autopublish scripts to generate and publish derivative packages with randomized names. This behavior modifies the package.json file by removing private flags, altering version numbers, and continuously republishing variants, which can lead to pollution of the npm registry and potential security risks for developers relying on this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall modern_cobra_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 modern_cobra_z3n package until a secure version is released. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The modern_cobra_z3n package has been identified as part of a malicious campaign that poses significant risks to developers and their applications. It is crucial to take immediate action by updating or removing the package to safeguard your projects.
See every vulnerability recorded for modern_cobra_z3n →
FAQ
The modern_cobra_z3n package is an npm package that is part of a malicious campaign aimed at manipulating npm's publishing system.
This vulnerability can lead to the pollution of the npm registry and may compromise the security of applications that depend on this package.
If you are using the modern_cobra_z3n package, you should update it to the latest patched version or consider removing it from your project.
You can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just package-lock.json. You can check if your application is affected by this vulnerability using the Vulert playground.
To prevent future vulnerabilities, regularly audit your dependencies, keep them updated, and utilize tools like Vulert for real-time monitoring.