Malicious Code Injection in cruel_giraffe_0xrequest: A Threat to npm Packages
Summary
MAL-2025-101123: Malicious code in cruel_giraffe_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 package 'cruel_giraffe_0xrequest' 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 the integrity of the npm registry.
Vulnerability Detail
The vulnerability in 'cruel_giraffe_0xrequest' originates from its involvement in a malicious campaign that floods the npm registry with derivative packages. The malicious payload modifies the package.json file to remove private flags, alters version numbers, and generates random package names, leading to pollution of the npm registry. This can result in developers unknowingly using compromised packages, potentially exposing their applications to further vulnerabilities.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall cruel_giraffe_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 remove the 'cruel_giraffe_0xrequest' package from your project by executing the command: 'npm uninstall cruel_giraffe_0xrequest'. This will prevent any malicious code from executing until a fix is applied.
Conclusion
The 'cruel_giraffe_0xrequest' package poses a significant risk due to its malicious code that can compromise the npm registry. It is crucial for developers to take immediate action by updating or removing the package to safeguard their applications. Utilizing tools like Vulert can further enhance security by providing real-time alerts for vulnerabilities.
See every vulnerability recorded for cruel_giraffe_0xrequest →
FAQ
The malicious code can lead to the publication of compromised packages, which may affect the integrity of your application and expose it to further vulnerabilities.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.
If an immediate update is not possible, consider removing the package from your project as a temporary measure to mitigate risks.
As of now, there is no specific patched version available. It is recommended to monitor the package repository for any updates.
Vulert uses package-lock.json to monitor and alert in real-time for open-source vulnerabilities, helping developers maintain secure applications.