Critical Malicious Code Vulnerability in @ensdomains/content-hash Package
Summary
MAL-2025-190666: Malicious code in @ensdomains/content-hash (npm). Affects @ensdomains/content-hash versions 3.0.1. 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 @ensdomains/content-hash package is a Node.js library commonly used for handling content hashes in Ethereum Name Service (ENS) applications. It provides functionalities to manage and manipulate content hashes associated with ENS domains. However, the package has been identified to contain malicious code that compromises the security of any system where it is installed.
Vulnerability Detail
The vulnerability originates from the presence of embedded malicious code within version 3.0.1 of the @ensdomains/content-hash 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 implications of this vulnerability are severe, as it may lead to data breaches and loss of control over the affected systems.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @ensdomains/content-hash
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, ensure that you do not run any applications that depend on the @ensdomains/content-hash package until it has been removed. You can uninstall the package using the following command in your terminal:
npm uninstall @ensdomains/content-hash
Conclusion
The @ensdomains/content-hash package has been compromised with malicious code, posing a significant security risk to any system using it. Immediate action is required to uninstall the package and secure any sensitive information. Users should remain vigilant and utilize tools like Vulert to monitor for vulnerabilities in their applications.
See every vulnerability recorded for @ensdomains/content-hash →
FAQ
You should immediately uninstall the package and rotate any secrets or keys stored on the affected system.
No, there is currently no patched version available for the @ensdomains/content-hash package.
You can use Vulert's playground at Vulert Scanner to check if your application is affected without needing to sign up.
Failing to address this vulnerability can lead to unauthorized access to sensitive data and potential data breaches.
It is highly recommended to avoid using the @ensdomains/content-hash package until the malicious code issue is resolved.