Malicious Code Injection in eshakhan Package: A Threat to npm Users
Summary
MAL-2025-171169: Malicious code in eshakhan (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 eshakhan package is part of the npm ecosystem, which is widely used for JavaScript package management. It is designed to facilitate the development and distribution of JavaScript applications. However, this package has been identified as part of a malicious campaign that aims to exploit npm's publishing capabilities, leading to potential security risks for developers and their applications.
Vulnerability Detail
The vulnerability in the eshakhan package originates from its association with the tea.xyz token reward campaign. This campaign has flooded the npm registry with packages that contain malicious scripts designed to manipulate package metadata. Specifically, the malicious payload alters the package.json file by removing private flags, changing version numbers, and generating random package names. This behavior not only compromises the integrity of the npm registry but also poses a risk of reputation damage to developers who may unknowingly use these packages. The continuous republishing of these variants can lead to a polluted npm ecosystem, making it difficult for developers to find legitimate packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall eshakhan
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 eshakhan package and look for alternative packages that provide similar functionality without the associated risks. Additionally, consider using tools like Vulert to monitor your package-lock.json file for vulnerabilities. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The eshakhan package poses a significant security risk due to its malicious code injection capabilities. Developers should take immediate action to remove this package and monitor their dependencies for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for eshakhan →
FAQ
The eshakhan package is an npm package that has been identified as part of a malicious campaign targeting the npm ecosystem.
The vulnerability can lead to the injection of malicious code, compromising the integrity of your application and potentially damaging your reputation as a developer.
You should uninstall the eshakhan package immediately and review your project dependencies for any other potentially compromised packages.
You can use Vulert, which monitors your package-lock.json file for open-source vulnerabilities in real-time, alerting you to any issues.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by vulnerabilities without requiring any signup.