The issue is related to a time-of-check time-of-use (TOCTOU) race condition. This occurs because the address the socket uses is not checked. Specifically, DNS entries with a TTL of 0 can trigger a scenario where the initial resolution is a public address, but the subsequent resolution is a private address.