Malicious Code Injection in cochran-tea-archive: npm Package Vulnerability
Summary
MAL-2025-100630: Malicious code in cochran-tea-archive (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 'cochran-tea-archive' package is part of the tea.xyz token reward campaign, which has been associated with a series of malicious npm packages. These packages are designed to inflate developer reputation scores by automatically generating and publishing derivative packages with randomized names. The malicious nature of this package lies in its ability to modify the package.json file, removing private flags and changing version numbers, which can lead to significant security risks for developers and users relying on this package.
Vulnerability Detail
The vulnerability in the 'cochran-tea-archive' package originates from its design to automate the creation and publication of derivative packages. This includes scripts that modify the package.json file to remove private flags, change version numbers, and generate random package names. The continuous republishing of these variants can pollute the npm registry, making it difficult for developers to identify legitimate packages. The ramifications include potential exposure to malicious code, compromised application integrity, and a polluted ecosystem that undermines trust in npm packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cochran-tea-archive
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 workaround, you can temporarily avoid using the 'cochran-tea-archive' package by removing it from your dependencies and replacing it with a trusted alternative. Additionally, you can use the following command to uninstall the package: npm uninstall cochran-tea-archive.
Conclusion
The 'cochran-tea-archive' package presents a significant security risk due to its malicious code that alters package metadata and floods the npm registry. It is crucial for developers to remove this package and monitor their dependencies for vulnerabilities to maintain application security.
See every vulnerability recorded for cochran-tea-archive →
FAQ
The 'cochran-tea-archive' package is part of a malicious campaign that aims to inflate developer reputation scores through automated package publishing.
This vulnerability can lead to the injection of malicious code into your application, compromising its security and integrity.
You should immediately uninstall the 'cochran-tea-archive' package and monitor your application for any unusual behavior.
Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just your package-lock.json file.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.