Malicious Code Injection in cosmicclairvoyant: A Threat to npm Packages
Summary
MAL-2025-171070: Malicious code in cosmicclairvoyant (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
cosmicclairvoyant is an npm package that has been identified as part of a malicious campaign targeting the npm ecosystem. This package is designed to manipulate package metadata and publish derivative versions to inflate developer reputation scores. Its functionality is compromised due to the presence of malicious scripts that can lead to widespread pollution of the npm registry.
Vulnerability Detail
The vulnerability in cosmicclairvoyant originates from its association with the tea.xyz token reward campaign. It includes scripts that automatically modify the package.json file by removing private flags, altering version numbers, and generating random package names. This behavior not only compromises the integrity of the package but also poses a risk of flooding the npm registry with malicious variants, potentially affecting other developers and users relying on legitimate packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cosmicclairvoyant
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, avoid using cosmicclairvoyant and monitor your package dependencies for any signs of malicious activity. Regularly audit your npm packages using tools like npm audit to identify vulnerabilities.
Conclusion
The cosmicclairvoyant package poses a significant threat due to its malicious code designed to manipulate npm package metadata. It is crucial for developers to remove this package from their projects and monitor their dependencies for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for cosmicclairvoyant →
FAQ
cosmicclairvoyant is an npm package that has been identified as part of a malicious campaign to inflate developer reputation scores through the publication of derivative packages.
The vulnerability can lead to the injection of malicious code into your project, potentially compromising its security and integrity.
You should uninstall cosmicclairvoyant immediately and check your project for any dependencies that may be affected.
You can use tools like npm audit to scan your project for vulnerabilities. Additionally, Vulert can monitor your package-lock.json for real-time alerts on open-source vulnerabilities.
Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup required.