Finding Hundreds of SSRF Vulnerabilities on AWS
Many AWS-hosted web servers were vulnerable to SSRF via the Host header, allowing an attacker to make the server request the cloud metadata endpoint. This could expose IAM role information and potentially credentials.
Published on trickest.com
During our latest research project on Trickest, which involved uncovering IP addresses hidden behind proxies like Cloudflare we stumbled upon numerous IPs susceptible to SSRF via the Host header.
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
Likely the web server or application trusted the Host header and used it to construct a request to the metadata service without validation.
Impact
Attackers could access the metadata endpoint, potentially retrieving IAM role information and credentials, though the text only confirms metadata leakage.
What the attacker needed
Server accessible over HTTP/HTTPS; server uses Host header unsafely; cloud instance with metadata service
The fix
AWS advised updating Lightsail images to the latest version and enforcing IMDSv2 only.
How it was found
- Scan AWS IP ranges to collect URLs.
- Send requests with a Host header pointing to the metadata endpoint.
- Check if the response contains metadata indicators like '2022-09-24' and 'latest'.
- Identify vulnerable IPs and inspect IAM role names via the metadata endpoint.
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.
SSRF is when a server can be tricked into making requests to places it shouldn't, like internal services. Here, by setting the Host header, attackers made servers fetch the cloud metadata endpoint, which holds sensitive instance information.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.