Skip to the content

Fetch-url-http-3a-2f-2f169.254.169.254-2flatest-2fmeta Data-2fiam-2fsecurity Credentials-2f Jun 2026

The response contains:

While this URL is a legitimate tool for AWS Instance Profiles, it is also a primary target for Server-Side Request Forgery (SSRF) attacks. Here is a deep dive into what this URL does, why it’s a risk, and how to protect your infrastructure. What is 169.254.169.254?

Get the full benefits of IMDSv2 and disable IMDSv1 ... - AWS

When decoded, it translates to:

It is only accessible from within the running cloud instance (e.g., an AWS EC2 instance). It cannot be reached directly from the public internet. The response contains: While this URL is a

The Amazon Elastic Compute Cloud (Amazon EC2) Instance Metadata Service (IMDS) helps customers build secure and scalable applicati... Amazon Web Services Securing the EC2 Instance Metadata Service

The same convenience that helps developers also creates a dangerous attack vector – . If an attacker can trick your application into making an HTTP request to an arbitrary URL, they can point it to 169.254.169.254 and steal the instance’s IAM credentials.

This URL is the gateway to temporary IAM (Identity and Access Management) credentials for any Amazon EC2 instance. When a web application blindly fetches this URL—whether through Server-Side Request Forgery (SSRF), a misconfigured proxy, or a vulnerable fetch() call—an attacker can hijack those credentials and pivot from a simple input validation flaw to full cloud account takeover.

When an attacker inputs this string into a vulnerable web application, they are attempting to exploit an SSRF vulnerability. This walkthrough explains how the mechanism works, why attackers target it, and how to defend your infrastructure. Anatomy of the Targeted Endpoint Get the full benefits of IMDSv2 and disable IMDSv1

The specific URL http://169.254.169.254/latest/meta-data/iam/security-credentials/ provides a way to retrieve the IAM security credentials for an instance. When an instance makes a request to this URL, it receives a JSON document containing the security credentials, including:

If request contains "169.254.169.254" OR "metadata" AND path contains "iam/security-credentials" → Block.

: Regularly monitor and audit the use of these credentials within your AWS environment.

This prevents unprivileged web application processes (e.g., www-data ) from reaching the metadata service, even if SSRF exists. The Amazon Elastic Compute Cloud (Amazon EC2) Instance

This specific path targets the Amazon Web Services (AWS) Instance Metadata Service (IMDS). Attackers use this string in web application scanners, payload injections, and exploit scripts to steal temporary security credentials from misconfigured cloud servers.

If you need help writing a to block this payload at your gateway.

If you are seeing the string fetch-url-http-3A-2F-2F169.254.169.254-2Flatest-2Fmeta data-2Fiam-2Fsecurity credentials-2F in your application logs, web application firewall (WAF) alerts, or security scans, your system is likely being targeted by a Server-Side Request Forgery (SSRF) attack.

The encoded URL http://169.254.169 is commonly used in Server-Side Request Forgery (SSRF) attacks to access temporary IAM security credentials from cloud metadata services. If successful, attackers can use these credentials to gain unauthorized access to cloud resources. To mitigate this risk, security professionals recommend implementing AWS IMDSv2, strictly validating user-provided URLs, and applying the principle of least privilege to instance roles.