Malicious Code Injection in ahmadfaiz Package: npm Vulnerability Overview
Summary
MAL-2025-170693: Malicious code in ahmadfaiz (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 ahmadfaiz package is part of the npm ecosystem and has been implicated in a malicious campaign associated with the tea.xyz token reward initiative. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores in exchange for token rewards. Its functionality is compromised due to the presence of malicious scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability originates from the inclusion of malicious code within the ahmadfaiz package, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior leads to the continuous republishing of variants, effectively polluting the npm registry and potentially compromising the integrity of dependent projects. The malicious payload is designed to exploit the npm ecosystem, posing risks to developers and users alike.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall ahmadfaiz
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 measure, you can avoid using the ahmadfaiz package altogether. If it is already included in your project, remove it by executing the command: npm uninstall ahmadfaiz. Additionally, consider using Vulert to monitor your project 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 ahmadfaiz package presents a significant security risk due to its malicious code that alters package metadata and floods the npm registry. It is essential for developers to remove this package and monitor their projects for vulnerabilities to maintain the integrity of their applications.
See every vulnerability recorded for ahmadfaiz →
FAQ
The ahmadfaiz package is an npm package associated with a token reward campaign that automates the generation and publication of derivative packages.
The malicious code modifies your package.json file, removes private flags, and generates random package names, which can lead to the pollution of the npm registry and potential security risks.
You should uninstall the ahmadfaiz package immediately using the command: npm uninstall ahmadfaiz.
Yes, you can use Vulert, which monitors and alerts you in real-time for open-source vulnerabilities using just your package-lock.json file.
You can check your application for vulnerabilities by using the Vulert playground at Vulert Scanner without needing to sign up.