Malicious Code Injection in Constitutional Rat Dumbs Package
Summary
MAL-2025-100898: Malicious code in constitutional_rat_dumbs (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 'constitutional_rat_dumbs' package is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to automate the generation and publication of derivative packages, often with randomized names, to inflate developer reputation scores for token rewards. Its functionality is compromised by malicious scripts that manipulate package metadata.
Vulnerability Detail
The vulnerability originates from the presence of malicious code within the 'constitutional_rat_dumbs' package. This code modifies the package.json file by removing private flags, altering version numbers, and generating random package names. The scripts are designed to continuously republish these variants, leading to pollution of the npm registry and potential exploitation of developers' reputations. The malicious payload can also introduce security risks to applications that depend on this package.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall constitutional_rat_dumbs
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 avoid using the 'constitutional_rat_dumbs' package and look for alternative packages that provide similar functionality without the associated risks. Additionally, consider using tools like Vulert to monitor your project for vulnerabilities.
Conclusion
The 'constitutional_rat_dumbs' package poses a significant risk due to its malicious code that alters package metadata and can lead to reputation damage. It is crucial to remove this package from your project and monitor for vulnerabilities using tools like Vulert to ensure the security of your applications.
See every vulnerability recorded for constitutional_rat_dumbs →
FAQ
It is an npm package associated with a token reward campaign that automates the publication of derivative packages.
The malicious code modifies your package metadata and can lead to the pollution of the npm registry, potentially harming your project's reputation.
You should uninstall the package immediately using 'npm uninstall constitutional_rat_dumbs' and look for alternatives.
Yes, you can use Vulert, which monitors your package-lock.json for vulnerabilities in real-time without requiring code access.
You can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your application without signing up.