Malicious Code Injection in ghjcng-devapptea: A Threat to npm Packages
Summary
MAL-2025-103115: Malicious code in ghjcng-devapptea (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
ghjcng-devapptea is an npm package that is part of the tea.xyz token reward campaign. This package is designed to facilitate the distribution of token rewards through various npm packages. However, it has been identified as containing malicious scripts that can compromise the integrity of the npm registry and the developer's reputation.
Vulnerability Detail
The vulnerability stems from malicious code embedded within the ghjcng-devapptea package. This code is designed to modify the package.json file by removing private flags, altering version numbers, and generating random package names. The scripts (auto.js, autopublish.js, etc.) continuously republish these variants, leading to pollution of the npm registry and potential misuse of developer reputation scores. The origin of this issue is linked to the tea.xyz token reward campaign, which incentivizes the creation of numerous derivative packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall ghjcng-devapptea
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 ghjcng-devapptea package from your project by executing: npm uninstall ghjcng-devapptea. This will prevent any malicious scripts from executing until a secure version is available.
Conclusion
The ghjcng-devapptea package poses a significant risk due to its embedded malicious code, which can compromise the integrity of npm packages and developer reputations. It is crucial to take immediate action by updating or removing the package and employing monitoring tools like Vulert to safeguard against future vulnerabilities.
See every vulnerability recorded for ghjcng-devapptea →
FAQ
The malicious code modifies package.json files, removes private flags, and generates random package names 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 your application without any signup.
Using compromised packages can lead to reputation damage, unauthorized access to sensitive data, and potential exploitation of your application.
Regularly audit your dependencies, use tools like Vulert for monitoring, and stay updated on security advisories related to the packages you use.
Immediately remove the affected package, update your dependencies, and review your application for any unauthorized changes or data breaches.