Malicious Code Detected in @yaqiguo/dnstest: A Critical Security Threat
Summary
MAL-2025-6879: Malicious code in @yaqiguo/dnstest (npm). Affects @yaqiguo/dnstest versions 1.0.0. 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 '@yaqiguo/dnstest' is an npm package designed for DNS testing functionalities. It allows developers to perform various DNS queries and tests. However, the package has been flagged for malicious behavior, specifically for communicating with domains associated with malicious activities, posing a significant security risk to users and their applications.
Vulnerability Detail
The vulnerability in the '@yaqiguo/dnstest' package arises from its ability to communicate with a domain linked to malicious activities. This behavior can lead to data exfiltration, unauthorized access, or other malicious actions that compromise the integrity and security of the user's application. The vulnerability was identified by the OpenSSF Package Analysis project, which flagged version 1.0.0 of the package as malicious.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
npm uninstall @yaqiguo/dnstest
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, you can avoid using the '@yaqiguo/dnstest' package altogether and instead utilize other DNS testing libraries that are known to be secure. For example, you might consider using 'dns' or 'dns-packet' packages, which are widely used and trusted in the community.
Conclusion
The '@yaqiguo/dnstest' package has been identified as malicious due to its communication with harmful domains. Users are advised to uninstall the package and seek secure alternatives to protect their applications. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.
See every vulnerability recorded for @yaqiguo/dnstest →
FAQ
The vulnerability involves the package communicating with a domain associated with malicious activities, which can compromise application security.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By checking your package-lock.json file, you can determine if your application is affected. Visit the Vulert playground at Vulert Scanner for a quick check.
No patch is available for the '@yaqiguo/dnstest' package. The recommended action is to uninstall the package and replace it with a secure alternative.
You should uninstall the package immediately and consider using other secure DNS testing libraries.
Vulert helps by monitoring your package dependencies for known vulnerabilities and providing real-time alerts, allowing you to maintain the security of your applications without needing to access the code directly.