From SSL Checker to Cloud Takeover: How One Parameter Leaked AWS IAM Credentials
A website-checker feature fetched user-supplied URLs without validation, allowing server-side requests to internal addresses. The attacker reached the cloud metadata service and obtained live AWS IAM credentials.
Published on medium.com
There’s a specific silence that hits right before you realize a bug is bigger than you thought. Not excitement — just a pause.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The backend fetched user-supplied URLs with no allowlist, no private-address blocking, no egress filtering, and IMDSv1 enabled.
Impact
An attacker could use the feature to reach internal services and steal temporary AWS IAM credentials, potentially accessing S3 or moving laterally within the role's permissions.
What the attacker needed
Access to the web checker feature; no authentication required
The fix
The feature should be fixed by allowlisting outbound destinations, blocking private and link-local addresses, enforcing IMDSv2, and adding network egress filtering.
How it was found
- Send a request to a non-routable address and observe a long delay, confirming a real outbound connection.
- Send a request to the loopback address and receive internal server details.
- Send a request to a unique out-of-band domain and confirm the server's infrastructure made the request.
- Request the cloud metadata root and confirm AWS hosting.
- Request the IAM security-credentials path to get the role name, then query that role to obtain live credentials.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The site had a tool that fetched a web address for you. The server did the fetching, and it would fetch any address, including secret internal ones. That let the tester ask the server to read its own cloud credentials, which are normally only for the server itself.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.