Malicious Code Injection in unpleasant_cod_z3n: A Threat to npm Ecosystem
Summary
MAL-2025-97167: Malicious code in unpleasant_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 'unpleasant_cod_z3n' is part of a series of malicious npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to manipulate the npm registry by automatically generating and publishing derivative packages with randomized names. The malicious nature of this package lies in its ability to alter the package.json file, compromising the integrity of the software and potentially affecting developers' reputations.
Vulnerability Detail
The vulnerability in 'unpleasant_cod_z3n' originates from its inclusion in a campaign that floods the npm registry with malicious packages. It contains scripts that modify the package.json file to remove private flags and change version numbers, allowing it to republish variants continuously. This behavior can lead to pollution of the npm registry, making it difficult for developers to trust legitimate packages and potentially exposing them to further security risks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall unpleasant_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 prevent the installation of this malicious package by using npm's package-lock.json to monitor your dependencies. Ensure that your package-lock.json file is up to date and does not include 'unpleasant_cod_z3n'.
Conclusion
The 'unpleasant_cod_z3n' package poses a significant threat to the npm ecosystem by injecting malicious code and altering package metadata. It is crucial for developers to be vigilant and remove any instances of this package from their projects. Utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.
See every vulnerability recorded for unpleasant_cod_z3n →
FAQ
'unpleasant_cod_z3n' is a malicious npm package that modifies package.json files to remove private flags and republish variants, contributing to npm registry pollution.
The vulnerability can compromise the integrity of your project by introducing malicious code and affecting the reputation of your dependencies.
You should uninstall the package immediately using 'npm uninstall unpleasant_cod_z3n' and check your project for any other affected packages.
You can use tools like Vulert, which monitors your package-lock.json for open-source vulnerabilities in real-time without requiring code access or installation.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.