Malicious Code Injection in universal_moth_requirement Package
Summary
MAL-2025-97155: Malicious code in universal_moth_requirement (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 universal_moth_requirement package is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to facilitate token rewards by generating and publishing derivative packages. However, it has been compromised to include malicious scripts that manipulate package metadata, leading to potential security risks for developers and users alike.
Vulnerability Detail
The vulnerability originates from a malicious payload embedded within the universal_moth_requirement package. This payload modifies the package.json file by removing private flags, altering version numbers, and generating random package names. The intent is to inflate developer reputation scores and pollute the npm registry with these derivative packages. This can lead to significant security risks, including the unintentional use of compromised packages in applications, which may expose sensitive data or allow for further exploitation.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall universal_moth_requirement
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 universal_moth_requirement package from your project by executing the following command: npm uninstall universal_moth_requirement. This will prevent any malicious code from executing until a secure version is available.
Conclusion
The universal_moth_requirement package has been identified as containing malicious code that poses significant security risks. It is crucial for developers to take immediate action by updating or removing the package to safeguard their applications. Utilizing tools like Vulert can help in monitoring and managing open-source vulnerabilities effectively.
See every vulnerability recorded for universal_moth_requirement →
FAQ
It is an npm package associated with the tea.xyz token reward campaign, designed to generate and publish derivative packages.
The vulnerability can lead to the introduction of malicious code into your application, potentially compromising security and data integrity.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without any signup.
You should uninstall the package as a temporary measure to mitigate the risk until a secure version is available.
Regularly monitor your dependencies using tools like Vulert and keep your packages updated to the latest secure versions.