Intent-Code Divergence
Medium
- Confidence
- 95% confidence
- Finding
- The anti-SSRF helper resolves DNS before the fetch, but the subsequent 'requests.get(target_url)' performs its own resolution and connection later, so the code does not guarantee it connects to the same vetted IP. This creates a TOCTOU gap that can be exploited via DNS rebinding or rapidly changing DNS answers, especially because the program fetches attacker-supplied task URLs from a remote service.
