Malicious Code Injection in pretty_haddock-appteadev: A Threat to npm Users
Summary
MAL-2025-107238: Malicious code in pretty_haddock-appteadev (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
pretty_haddock-appteadev is an npm package that is part of the tea.xyz token reward campaign. This package is designed to facilitate the generation and publication of derivative packages. However, it has been compromised, leading to significant security risks for developers using this package.
Vulnerability Detail
The vulnerability stems from malicious code embedded in the pretty_haddock-appteadev package. This code modifies the package.json file to remove private flags, alters version numbers, and creates random package names, which are then continuously republished. This behavior is intended to inflate developer reputation scores for token rewards, ultimately polluting the npm registry and potentially leading to further exploitation of affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall pretty_haddock-appteadev
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 pretty_haddock-appteadev package altogether. If it is already in use, consider removing it from your dependencies and replacing it with a trusted alternative.
Conclusion
The pretty_haddock-appteadev package poses a significant security risk due to its malicious code that alters package configurations and floods the npm registry. It is crucial for developers to remove this package and monitor their projects for any vulnerabilities.
See every vulnerability recorded for pretty_haddock-appteadev →
FAQ
The main risk is that the malicious code can compromise your project by modifying package files and flooding the npm registry with unwanted packages.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.
You should remove the package immediately and monitor your project for any unusual behavior.
While specific exploits have not been detailed, the behavior of the package suggests that it can lead to further security issues if not addressed.
Regularly audit your dependencies, use tools like Vulert for monitoring, and stay updated on security advisories related to the packages you use.