nginx maintains an internal DNS cache for resolved domain names. However, when searching the cache, nginx only checks that the crc32 of the names match and that the shorter name is a prefix of the longer name. It does not check that the names are equal in length. One way to exploit this is if nginx is configured as a forward proxy. This is an atypical use case, but it has been discussed on the nginx mailing list before[1]. For example, using this nginx.conf: events { worker_connections 1024; } http { resolver; server { listen 8080; location / { proxy_pass http://$http_host$request_uri; } } } You can then run curl to see the cache poisoning in effect: $ curl -H 'Host:' Ho hum, nothing to see here, move along please. $ curl -H 'Host:' Oops, you shouldn't be asking me for! (Restart nginx and run only the second command to see its expected behavior; i.e., actually fetching This works because crc32("") == crc32(""). The first request cached the IP address for, and then the second request used this IP address instead of querying for's real IP address because of the matching CRCs and the common prefix. [1]