Malicious Code Injection in afdalhameed Package: npm Vulnerability Overview
Summary
MAL-2025-170678: Malicious code in afdalhameed (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 afdalhameed package is part of the npm ecosystem, which is widely used for JavaScript package management. It is often utilized in various applications to enhance functionality through reusable code. However, this package has been identified as part of a malicious campaign that aims to exploit npm's publishing mechanisms, leading to potential security risks for developers and users alike.
Vulnerability Detail
The vulnerability in the afdalhameed package stems from its association with the tea.xyz token reward campaign. This package contains scripts designed to automatically generate and publish derivative packages with randomized names, effectively polluting the npm registry. The malicious payload modifies the package.json file by removing private flags, altering version numbers, and continuously republishing variants. This not only inflates developer reputation scores but also poses a risk of dependency confusion and potential exploitation of applications relying on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall afdalhameed
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 afdalhameed package and 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 or additions.
Conclusion
The afdalhameed package poses a significant security risk due to its malicious code designed to exploit npm's publishing system. Developers should take immediate action to remove this package and monitor their applications for any potential vulnerabilities. Utilizing tools like Vulert can help maintain the security of your software projects.
See every vulnerability recorded for afdalhameed →
FAQ
The afdalhameed package is an npm package that has been identified as part of a malicious campaign aimed at exploiting the npm registry.
This vulnerability can lead to dependency confusion, where malicious packages may be inadvertently used in your application, potentially leading to security breaches.
If you have installed the afdalhameed package, you should uninstall it immediately and check for any dependencies that may have been affected.
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.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.