Critical Malicious Code Vulnerability in @ensdomains/ens-validation Package
Summary
MAL-2025-190731: Malicious code in @ensdomains/ens-validation (npm). Affects @ensdomains/ens-validation versions 0.1.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/ens-validation package is an npm library designed for validating Ethereum Name Service (ENS) domain names. It is widely used in decentralized applications to ensure that domain names conform to the ENS standards. However, this package has been compromised, leading to significant security risks for any application utilizing it.
Vulnerability Detail
The vulnerability stems from the presence of malicious code embedded within version 0.1.1 of the @ensdomains/ens-validation package. This code can fully compromise any computer that has the package installed, potentially allowing unauthorized access to sensitive information such as secrets and keys. The malicious code is classified under CWE-506, indicating that it contains code that appears to be malicious in nature. Users are advised to treat any system with this package as compromised and take immediate action.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @ensdomains/ens-validation
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 need to continue using ENS validation functionality, consider using an alternative package that does not have known vulnerabilities. Always verify the integrity of packages before installation.
Conclusion
The @ensdomains/ens-validation package has been compromised with malicious code, posing severe security risks to users. Immediate action is required to uninstall the package and secure any exposed information. Utilizing tools like Vulert can help in monitoring for such vulnerabilities in the future.
See every vulnerability recorded for @ensdomains/ens-validation →
FAQ
Immediately uninstall the package and rotate any sensitive information that may have been compromised.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
Currently, there is no patched version available. The best course of action is to uninstall the compromised package.
Failing to address this vulnerability can lead to unauthorized access to sensitive data and complete control of your system by malicious actors.
Regularly audit your dependencies, use tools like Vulert for monitoring, and stay updated on security advisories for the packages you use.