Privilege Escalation Issue in Amazon ECS Leads to IAM Hijacking

At Black Hat USA 2025, Sweet Security’s Naor Haziz unveiled “ECScape,” a technique exploiting an undocumented Amazon Elastic Container Service (ECS) protocol to escalate privileges, bypass container isolation, and access other cloud resources on the same EC2 instance. By impersonating an ECS agent, Haziz demonstrated how attackers could hijack IAM credentials from higher-privilege containers without misconfigurations, leveraging AWS’s Instance Metadata Service (IMDS) enabled by default. AWS disputed the severity, issued no patch or CVE, and stated that ECS customers are responsible for securing EC2-based deployments. Haziz recommended disabling or restricting IMDS, limiting ECS agent permissions, isolating sensitive workloads, and considering AWS Fargate for stronger separation.

Edward Kiledjian @ekiledjian