Malicious Code Injection in public_elk_z3n Package - npm Vulnerability
Summary
MAL-2025-107413: Malicious code in public_elk_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 public_elk_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 the npm registry with malicious packages. These packages often contain scripts designed to manipulate package metadata and inflate developer reputation scores, posing significant risks to users and the integrity of the npm registry.
Vulnerability Detail
The vulnerability in the public_elk_z3n package originates from its association with a malicious campaign that employs scripts to modify the package.json file. This includes removing private flags, altering version numbers, and generating random package names, which leads to the continuous republishing of these variants. The ramifications include potential exposure of sensitive information, pollution of the npm registry, and undermining the trustworthiness of the package management ecosystem.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall public_elk_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 public_elk_z3n package from your project by executing 'npm uninstall public_elk_z3n'. This will prevent any malicious code from executing while you assess the situation and look for a secure alternative package.
Conclusion
The public_elk_z3n package has been identified as containing malicious code that poses significant risks to users and the npm ecosystem. It is crucial to take immediate action by updating or removing the package to protect your project from potential vulnerabilities.
See every vulnerability recorded for public_elk_z3n →
FAQ
The public_elk_z3n package is an npm package that has been identified as part of a malicious campaign to inflate developer reputation scores through the publication of derivative packages.
This vulnerability can lead to the exposure of sensitive information, pollution of the npm registry, and potential security risks for your project due to the malicious code embedded in the package.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By utilizing the Vulert playground, you can check if your application is affected by this vulnerability without needing to sign up.
If you cannot update the package, it is advisable to remove it from your project and look for a secure alternative. Additionally, regularly monitor your dependencies for vulnerabilities.
More information can be found in the vulnerability report on the GitHub repository of the malicious packages, which details the specific issues and affected versions.