Malicious Code Injection in middle_elk_z3n Package - npm Vulnerability
Summary
MAL-2025-95463: Malicious code in middle_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 middle_elk_z3n package is part of the npm ecosystem and is designed to facilitate various functionalities within JavaScript applications. However, it has been identified as part of a malicious campaign that exploits npm's package management system. This campaign involves the creation of numerous derivative packages with the intent to inflate developer reputation scores for token rewards, making it a significant concern for developers relying on npm packages.
Vulnerability Detail
The vulnerability in the middle_elk_z3n package originates from its involvement in a token reward campaign that floods the npm registry with malicious packages. These packages contain scripts that modify the package.json file to remove private flags, alter version numbers, and generate random package names, which leads to the continuous republishing of variants. This behavior can pollute the npm registry, potentially compromising the integrity of applications that depend on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall middle_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 avoid using the middle_elk_z3n package and instead look for alternative packages that provide similar functionality without the associated risks. Additionally, you can monitor your package-lock.json file for any unauthorized changes.
Conclusion
The middle_elk_z3n package poses a significant risk due to its involvement in a malicious campaign that alters package metadata and floods the npm registry. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities to maintain the integrity of their applications.
See every vulnerability recorded for middle_elk_z3n →
FAQ
middle_elk_z3n is an npm package that has been identified as part of a malicious campaign to inflate developer reputation scores through the creation of derivative packages.
The vulnerability can lead to the pollution of the npm registry, potentially compromising the integrity of your application and introducing malicious code.
You should remove the middle_elk_z3n package from your project and monitor your package-lock.json file for any unauthorized changes.
Yes, you can use tools like Vulert, which monitors your package-lock.json file for open-source vulnerabilities in real-time without requiring code access or installation.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.