Malicious Code Injection in Electric Magpie Dumbs Package
Summary
MAL-2025-102022: Malicious code in electric_magpie_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
Electric Magpie Dumbs is an npm package that is part of the tea.xyz token reward campaign. It is designed to facilitate various functionalities within the npm ecosystem. However, it has been identified as a malicious package that employs scripts to manipulate its own metadata and publish derivative versions, thereby inflating developer reputation scores for token rewards. This behavior poses significant risks to developers and the integrity of the npm registry.
Vulnerability Detail
The vulnerability originates from the malicious code embedded within the electric_magpie_dumbs package. This code modifies the package.json file by removing private flags, altering version numbers, and generating random package names. The scripts continuously republish these variants, leading to pollution of the npm registry and potential exploitation of unsuspecting developers. The ramifications include compromised package integrity, increased risk of dependency confusion, and potential security breaches in applications relying on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall electric_magpie_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 remove the electric_magpie_dumbs package from your project by executing the command: npm uninstall electric_magpie_dumbs. This will prevent any malicious code from executing in your environment until a secure version is available.
Conclusion
The electric_magpie_dumbs package has been identified as a malicious entity within the npm ecosystem, posing significant risks to developers and their projects. It is crucial to take immediate action by uninstalling the package and monitoring your dependencies for vulnerabilities. Utilizing tools like Vulert can help maintain the security of your applications.
See every vulnerability recorded for electric_magpie_dumbs →
FAQ
Electric Magpie Dumbs is an npm package associated with the tea.xyz token reward campaign, which has been identified as containing malicious code.
The malicious code modifies your package.json file and can lead to the publication of harmful variants, compromising the integrity of your project.
You should uninstall the package immediately and monitor your project for any unusual behavior. Consider using tools like Vulert to check for vulnerabilities.
You can use Vulert, which monitors your package-lock.json for vulnerabilities in real-time without requiring code access. You can also check your application using the Vulert playground.
Regularly audit your dependencies, use tools like Vulert for monitoring, and stay updated on security advisories related to the packages you use.