Malicious Code Injection in hard_cod_0xrequest Package - npm Vulnerability
Summary
MAL-2025-103600: Malicious code in hard_cod_0xrequest (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 hard_cod_0xrequest package is part of a series of npm packages that emerged during the tea.xyz token reward campaign. These packages are designed to manipulate the npm registry by creating and publishing numerous derivative packages with randomized names. The primary function of these packages is to inflate developer reputation scores for rewards associated with the tea protocol. However, they are compromised and pose significant risks to users.
Vulnerability Detail
The vulnerability in the hard_cod_0xrequest package stems from its malicious payload, which modifies the package.json file to remove private flags, alters version numbers, and generates random package names. This behavior leads to the continuous republishing of variants, polluting the npm registry and potentially compromising the integrity of other packages. The source of this vulnerability is linked to the tea.xyz token reward campaign, which has been identified as a source of malicious npm packages.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hard_cod_0xrequest
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 hard_cod_0xrequest package and any other packages associated with the tea.xyz token reward campaign. Additionally, consider using alternative packages that provide similar functionality without the associated risks.
Conclusion
The hard_cod_0xrequest package poses a significant security risk due to its malicious behavior of modifying package files and republishing variants. It is essential to remove this package from your project and monitor for any vulnerabilities using tools like Vulert to ensure the integrity of your software.
See every vulnerability recorded for hard_cod_0xrequest →
FAQ
The hard_cod_0xrequest package is an npm package that is part of a malicious campaign aimed at inflating developer reputation scores through the creation of numerous derivative packages.
This vulnerability can compromise the integrity of your project by introducing malicious code that modifies your package.json and republishing variants that can pollute the npm registry.
If you have installed the hard_cod_0xrequest package, it is crucial to remove it immediately and check for any other affected packages in your project.
Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities in your software using just package-lock.json. You can check if your application is affected by this vulnerability using the Vulert playground without any signup.
To prevent similar vulnerabilities, regularly audit your dependencies, use trusted packages, and consider using tools like Vulert to monitor for vulnerabilities in real-time.