Malicious Code Injection in lonely_mastodon-apptea: A Threat to npm Users
Summary
MAL-2025-105312: Malicious code in lonely_mastodon-apptea (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 lonely_mastodon-apptea is part of the tea.xyz token reward campaign that has infiltrated the npm ecosystem. This package is designed to facilitate token rewards for developers by generating and publishing derivative packages. However, it has been compromised to include malicious scripts that can manipulate package metadata and flood the npm registry with unwanted variants.
Vulnerability Detail
The vulnerability in lonely_mastodon-apptea stems from its inclusion in a malicious campaign that modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior not only inflates developer reputation scores but also pollutes the npm registry, making it difficult for legitimate packages to be found. The malicious payload can lead to security risks for users who inadvertently install these compromised packages, potentially exposing them to further attacks.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall lonely_mastodon-apptea
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, users can avoid using the lonely_mastodon-apptea package until a secure version is released. Additionally, consider using npm audit to identify and address vulnerabilities in your project dependencies.
Conclusion
The lonely_mastodon-apptea package has been identified as containing malicious code that can compromise the integrity of npm projects. Users are advised to update their packages and utilize tools like Vulert to monitor for vulnerabilities. Staying informed and proactive is essential in maintaining software security.
See every vulnerability recorded for lonely_mastodon-apptea →
FAQ
The malicious code modifies package metadata to remove private flags and generates numerous derivative packages to inflate reputation scores.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without any signup.
Using compromised packages can expose your application to security vulnerabilities, data breaches, and potential loss of reputation.
Regularly audit your dependencies using tools like npm audit and stay updated on security advisories for the packages you use.
Immediately update the package to the latest version or remove it from your project to mitigate any potential risks.