Critical Malicious Code Vulnerability in hash-guard Package
Summary
MAL-2025-190628: Malicious code in hash-guard (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 hash-guard package is an npm library designed to provide security features for managing hashes and secrets in applications. It is commonly used by developers to ensure the integrity and confidentiality of sensitive data. However, this package has been compromised, leading to significant security risks for any systems utilizing it.
Vulnerability Detail
The vulnerability stems from the presence of malicious code embedded within the hash-guard package. This code can fully compromise any computer that has the package installed, allowing unauthorized access to sensitive information such as secrets and keys. The origin of this vulnerability is linked to a malicious actor who has manipulated the package, making it imperative for users to act swiftly to mitigate potential damage.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall hash-guard
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, if you still require similar functionality, consider using alternative packages that provide hash management without the associated risks. Always verify the integrity of packages before installation.
Conclusion
The hash-guard package has been identified as containing malicious code, posing a severe risk to any systems using it. Immediate action is required to remove the package and secure any sensitive information. Utilize tools like Vulert to stay informed about vulnerabilities in your software.
See every vulnerability recorded for hash-guard →
FAQ
Immediately uninstall the hash-guard package and rotate any secrets or keys stored on the affected system.
You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without any signup.
Failing to remove the package can lead to unauthorized access to sensitive information, potentially compromising your entire system.
Yes, consider using other npm packages that provide similar functionality without the security risks associated with hash-guard.
Vulert uses your package-lock.json file to monitor for vulnerabilities in real-time, providing alerts for any issues detected in your open-source dependencies.