Callback-url-http-3a-2f-2f169.254.169.254-2flatest-2fmeta Data-2fiam-2fsecurity Credentials-2f Official

The problem arises when an application is vulnerable to SSRF. SSRF allows an attacker to force the server to make arbitrary HTTP requests to internal or external addresses. By feeding the server a request to http://169.254.169.254/latest/meta-data/iam/security-credentials/ , the attacker can trick the application into fetching the instance’s IAM credentials and returning them in the response. With those credentials, the attacker can impersonate the instance and access any AWS resource that the IAM role permits.

The Metadata Gate: Understanding SSRF and the AWS 169.254.169.254 Endpoint Introduction

The threat model of this callback exploit heavily depends on whether your cloud infrastructure relies on or IMDSv2 . Access instance metadata for an EC2 instance The problem arises when an application is vulnerable to SSRF

"Code" : "Success", "LastUpdated" : "2026-06-05T12:00:00Z", "Type" : "AWS-HMAC", "AccessKeyId" : "ASIA...", "SecretAccessKey" : "...", "Token" : "...", "Expiration" : "2026-06-05T18:00:00Z" Use code with caution.

Require all instances to use the newer, more secure version. With those credentials, the attacker can impersonate the

: Because the request originates from inside the cloud environment, the metadata service trusts it.

Attackers use this URL to trick a vulnerable server into fetching temporary security credentials that can be used to take control of an entire cloud environment. Require all instances to use the newer, more secure version

The application then uses the URL http://169.254.169.254/latest/meta-data/iam/security-credentials/ to retrieve temporary security credentials (AccessKey, SecretKey, and Token) associated with that role. How to Access Security Credentials

Title: Something like "Understanding the Dangers of Metadata Service Callback URLs: A Deep Dive into http://169.254.169.254/latest/meta-data/iam/security-credentials/"

Validate all user-supplied URLs to prevent them from hitting internal IP ranges ( Conclusion