Malicious Code Injection in mahnud-unofagoagi-gamoni: A Threat to npm Users
Summary
MAL-2025-159129: Malicious code in mahnud-unofagoagi-gamoni (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 package 'mahnud-unofagoagi-gamoni' is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. It is designed to facilitate the automatic generation and publication of derivative packages with randomized names. This package is particularly vulnerable due to its inclusion of scripts that manipulate package metadata, potentially leading to widespread pollution of the npm registry.
Vulnerability Detail
The vulnerability in 'mahnud-unofagoagi-gamoni' originates from its malicious payload, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior is intended to inflate developer reputation scores for token rewards, but it also poses significant risks, including the potential for dependency confusion and the introduction of insecure packages into projects. The malicious scripts (auto.js, autopublish.js, etc.) continuously republish variants, exacerbating the issue.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall mahnud-unofagoagi-gamoni
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 'mahnud-unofagoagi-gamoni' package from your project by executing the command: 'npm uninstall mahnud-unofagoagi-gamoni'. This will prevent any malicious scripts from executing in your environment.
Conclusion
The 'mahnud-unofagoagi-gamoni' package poses a significant security risk due to its malicious code that alters package metadata and republish variants. It is crucial to take immediate action by updating or uninstalling the package to safeguard your projects. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.
See every vulnerability recorded for mahnud-unofagoagi-gamoni →
FAQ
The main issue is that it contains malicious code that modifies package metadata and republish variants to inflate developer reputation scores.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without needing to sign up.
Using this package can lead to dependency confusion, introduction of insecure packages, and pollution of the npm registry, which can compromise your project's security.
To prevent similar vulnerabilities, regularly audit your dependencies, use tools like Vulert for monitoring, and ensure that you only install packages from trusted sources.
If you have installed the 'mahnud-unofagoagi-gamoni' package, you should uninstall it immediately and check for any other affected packages in your project.