The consuming API calls a third-party document processing service. The service returns a JSON response: {"status":"ready","download_url":"https://cdn.processor.example.com/file.pdf"}.
The API fetches the download_url from the response, trusting that a URL returned by a legitimate third-party service is safe to follow. No URL validation is applied — the URL came from a trusted source, not a user.
download_url, or performs a DNS hijack/BGP hijack that causes the consuming API’s DNS resolution of the third-party domain to return an attacker-controlled server. Either way, the consuming API makes a legitimate request to what it believes is the trusted third-party, and receives a response that includes a malicious redirect URL.{"download_url":"http://169.254.169.254/latest/meta-data/iam/security-credentials/role"}. The API follows this URL without validation — it came from the trusted third-party — and makes a server-side HTTP request to the AWS metadata endpoint.