Malicious Code Injection in swjgkw-devapptea Package - npm Vulnerability
Summary
MAL-2025-109423: Malicious code in swjgkw-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
The swjgkw-devapptea package is part of the tea.xyz token reward campaign, which has been known to flood the npm registry with various packages. These packages are designed to manipulate developer reputation scores by automatically generating and publishing derivative packages with randomized names. The malicious nature of this package lies in its ability to alter its own metadata and continuously republish itself, leading to potential pollution of the npm registry.
Vulnerability Detail
The vulnerability in the swjgkw-devapptea package originates from its malicious code, which modifies the package.json file to remove private flags and changes version numbers. It generates random package names, primarily themed around Indonesian culture, and continuously republishes these variants. This behavior not only inflates developer reputation scores fraudulently but also poses a risk of polluting the npm registry with potentially harmful packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall swjgkw-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 swjgkw-devapptea package from your project by executing the command: npm uninstall swjgkw-devapptea. This will prevent any malicious code from executing while you seek a secure alternative.
Conclusion
The swjgkw-devapptea package contains malicious code that poses a significant risk to developers and the npm ecosystem. It is crucial to take immediate action by uninstalling the package and monitoring your projects for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for swjgkw-devapptea →
FAQ
The swjgkw-devapptea package is part of a campaign that generates and publishes multiple npm packages to inflate developer reputation scores for token rewards.
The malicious code modifies your package.json file, removes private flags, and republish variants, which can lead to pollution of the npm registry and potential security risks.
You should uninstall the swjgkw-devapptea package immediately and check for any updates or patches that may address the vulnerability.
Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just package-lock.json. You can check your application for vulnerabilities using the Vulert playground without any signup.
Regularly update your dependencies, monitor for vulnerabilities using tools like Vulert, and review the packages you include in your projects for any known issues.