How SSRF Can Expose AWS EC2 Metadata and Compromise IAM Roles ~ CloudGoat

In this post, I’ll demonstrate how a Server-Side Request Forgery (SSRF) vulnerability can be exploited to access the EC2 instance metadata service, allowing an attacker to retrieve IAM role credentials and potentially escalate privileges within the AWS environment. Privilege Escalation via SSRF on EC2 Introduction This scenario demonstrates a misconfigured AWS environment where an attacker can pivot through multiple services—starting from a limited IAM user and ultimately gaining high-privileged access by exploiting a Server-Side Request Forgery (SSRF) vulnerability in an EC2-hosted web application. ...

July 20, 2025 · 4 min · Bhagavan Bollina