Malicious Code Injection in foreign_grasshopper_z3n Package
Summary
MAL-2025-94569: Malicious code in foreign_grasshopper_z3n (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 foreign_grasshopper_z3n package is part of the npm ecosystem and appears to be associated with the tea.xyz token reward campaign. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores for rewards. However, it has been identified as containing malicious scripts that compromise its integrity.
Vulnerability Detail
The vulnerability stems from the presence of malicious code within the foreign_grasshopper_z3n package. This code modifies the package.json file to remove private flags, alters version numbers, and generates random package names, leading to the pollution of the npm registry. The malicious payload is part of a broader scheme to exploit the npm ecosystem, potentially affecting developers' reputations and the integrity of their projects.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall foreign_grasshopper_z3n
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 prevent the installation of this package by using npm's package-lock.json file to lock your dependencies. Additionally, consider using the following command to uninstall the package: npm uninstall foreign_grasshopper_z3n.
Conclusion
The foreign_grasshopper_z3n package has been identified as containing malicious code that compromises the integrity of projects using it. It is essential to remove this package and monitor your dependencies for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your open-source projects.
See every vulnerability recorded for foreign_grasshopper_z3n →
FAQ
It is an npm package associated with the tea.xyz token reward campaign, designed to generate and publish derivative packages.
The malicious code modifies your package.json file, potentially compromising your project's integrity and reputation.
You should uninstall the foreign_grasshopper_z3n package immediately and monitor your project for any unusual activity.
Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time using your package-lock.json file.
You can use the Vulert playground at Vulert Scanner to check for vulnerabilities without needing to sign up.