CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action
The product performs reverse DNS resolution on an IP address to obtain the hostname and make a security decision, but it does not properly ensure that the IP address is truly associated with the hostname.
Since DNS names can be easily spoofed or misreported, and it may be difficult for the product to detect if a trusted DNS server has been compromised, DNS names do not constitute a valid authentication mechanism. When the product performs a reverse DNS resolution for an IP address, if an attacker controls the DNS server for that IP address, then the attacker can cause the server to return an arbitrary hostname. As a result, the attacker may be able to bypass authentication, cause the wrong hostname to be recorded in log files to hide activities, or perform other attacks. Attackers can spoof DNS names by either (1) compromising a DNS server and modifying its records (sometimes called DNS cache poisoning), or (2) having legitimate control over a DNS server associated with their IP address.
Consequences
- Access Control: Gain Privileges or Assume Identity, Bypass Protection Mechanism
How to prevent it
- Architecture and Design: Use other means of identity verification that cannot be simply spoofed. Possibilities include a username/password or certificate.
- Implementation: Perform proper forward and reverse DNS lookups to detect DNS spoofing.
Recent advisories
- GHSA-x44h-65qv-cw74 — praisonaiagents has an SSRF protection bypass in `spider_tools._host_is_blocked()` via DNS-resolved hostnames (`127.0.0.1.nip.io`)
- GHSA-rjr6-rcgv-9m7m — MCP Ruby SDK: Streamable HTTP transport lacks DNS-rebinding (Host/Origin) protection
- GHSA-w856-8p3r-p338 — Glances: XML-RPC Server Missing Host Header Validation Enables DNS Rebinding Attack
- GHSA-x227-pf99-vffg — PraisonAI: MCP SSE transport binds 0.0.0.0 with no authentication and no Origin validation; bundled SecurityConfig is never wired in
- GHSA-xq94-r468-qwgj — OpenClaw: Browser SSRF hostname validation could be bypassed by DNS rebinding
- GHSA-q9w8-cf67-r238 — OpenClaw: macOS Tailnet DNS Spoofing & Credential Exfiltration
- GHSA-phhv-63fh-rrc8 — Jenkins has a DNS rebinding vulnerability in WebSocket CLI origin validation
- GHSA-vg6x-rcgg-rjx6 — Websites were able to send any requests to the development server and read the response in vite
- GHSA-4jcv-vp96-94xr — MindsDB Vulnerable to Bypass of SSRF Protection with DNS Rebinding
- GHSA-wp3j-rvfp-624h — RubyGems vulnerable to DNS hijack attack
- GHSA-73w7-6w9g-gc8w — RubyGems has Origin Validation Error vulnerability
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor