Malicious Code Injection in compact_cod_z3n: A Threat to npm Packages
Summary
MAL-2025-132586: Malicious code in compact_cod_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 package 'compact_cod_z3n' is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. This behavior poses a significant risk to the integrity of the npm ecosystem.
Vulnerability Detail
The vulnerability in 'compact_cod_z3n' originates from its malicious payload, which modifies the package.json file to remove private flags and alters version numbers. It generates random package names, often themed around Indonesian culture, and continuously republishes these variants to pollute the npm registry. This not only compromises the security of the affected packages but also affects the overall trustworthiness of the npm ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall compact_cod_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 remove the 'compact_cod_z3n' package from your project by executing: npm uninstall compact_cod_z3n. This will prevent any malicious code from executing while you seek a secure alternative.
Conclusion
The 'compact_cod_z3n' package poses a significant risk due to its malicious code that alters package metadata and floods the npm registry with compromised packages. It is crucial to take immediate action by updating or removing the package to safeguard your projects.
See every vulnerability recorded for compact_cod_z3n →
FAQ
The vulnerability involves malicious code that modifies package.json files and repackages them under random names, compromising the integrity of the npm registry.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
If immediate updates are not possible, consider removing the package from your project as a temporary measure to mitigate risks.
While specific exploits have not been detailed, the malicious behavior of the package can lead to unauthorized access and manipulation of your project's dependencies.
Regularly audit your dependencies using tools like Vulert and stay updated with the latest security patches for all packages in your project.