Malicious Code Injection in astrowatcher: npm Package Vulnerability
Summary
MAL-2025-170932: Malicious code in astrowatcher (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
astrowatcher is an npm package that is part of the tea.xyz token reward campaign. It is designed to facilitate certain functionalities within the npm ecosystem. However, it has been identified as vulnerable due to the presence of malicious code that can compromise the integrity of the package and the npm registry.
Vulnerability Detail
The vulnerability originates from a malicious payload embedded within the astrowatcher 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 for token rewards, leading to a polluted npm registry with numerous derivative packages. This can result in significant security risks, including the potential for dependency confusion and the spread of malicious code across projects that rely on affected packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall astrowatcher
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 astrowatcher package from your project by executing the command: npm uninstall astrowatcher. This will prevent any malicious code from executing until a secure version is available.
Conclusion
The astrowatcher npm package has been identified as containing malicious code that poses a significant risk to developers and the integrity of the npm registry. It is crucial to take immediate action by updating or uninstalling the package to safeguard your projects.
See every vulnerability recorded for astrowatcher →
FAQ
The vulnerability involves malicious code that alters package.json files and generates random package names, compromising the integrity of the npm registry.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check if your application is affected without any signup.
Using the compromised package can lead to dependency confusion, the introduction of malicious code into your project, and a polluted npm registry.
Regularly auditing your dependencies and using tools like Vulert can help identify and mitigate vulnerabilities before they impact your project.
If an immediate update is not possible, consider uninstalling the package as a temporary measure to protect your application from potential threats.
Follow Vulert in Google
Get more Vulert vulnerability and dependency-security updates in Google Search and AI results.