Malicious Code Injection in electrical_haddock-teagooddev Package
Summary
MAL-2025-102026: Malicious code in electrical_haddock-teagooddev (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 electrical_haddock-teagooddev package is part of the npm ecosystem and is associated with the tea.xyz token reward campaign. This package is designed to facilitate the automatic generation and publication of derivative packages, which can inflate developer reputation scores for token rewards. However, it has been identified as containing malicious code that compromises its integrity and the security of the npm registry.
Vulnerability Detail
The vulnerability originates from a malicious payload embedded within the electrical_haddock-teagooddev package. This payload modifies the package.json file by removing private flags, altering version numbers, and generating random package names. It continuously republishes these variants, leading to pollution of the npm registry and potential exploitation of developers who unknowingly use these compromised packages. The ramifications include loss of trust in the npm ecosystem and potential security breaches for applications relying on these packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall electrical_haddock-teagooddev
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 electrical_haddock-teagooddev package altogether 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. You can check if your application is affected by this vulnerability using the Vulert playground at https://vulert.com/scanner without any signup.
Conclusion
The electrical_haddock-teagooddev package poses a significant security risk due to its malicious code that alters package metadata and republishing behavior. It is crucial for developers to remove this package from their projects and monitor for vulnerabilities using tools like Vulert to maintain the integrity of their applications.
See every vulnerability recorded for electrical_haddock-teagooddev →
FAQ
It is an npm package associated with the tea.xyz token reward campaign, designed to automate the generation and publication of packages.
The vulnerability allows the package to modify package.json files, remove private flags, and republish variants, leading to npm registry pollution.
You can use the Vulert playground at Vulert Scanner to check for vulnerabilities in your project without needing to sign up.
You should uninstall the electrical_haddock-teagooddev package immediately and look for secure alternatives.
Currently, there is no patched version available. It is recommended to remove the package and monitor for updates.