Cloud Privilege Escalation Paths in AWS IAM

How ordinary IAM permissions chain into full admin access.

· 9 min read · Updated
Cover illustration for “Cloud Privilege Escalation Paths in AWS IAM”
Post-Exploitation · September 30, 2026 · 9 min read · 2,065 words

AWS security exposure mostly lives in layers a web application penetration test never touches, and the IAM layer is where that exposure concentrates. Engineering teams that treat a web app test as proof their AWS environment is covered carry that false sense of safety straight into audits and enterprise security reviews.

The AWS attack surface web application penetration tests miss

A web application penetration test is scoped to the application: its inputs, its authentication flow, its business logic. AWS infrastructure built around that application runs on a different set of rules entirely, and a standard web app scope does not reach IAM privilege escalation chains, EC2 instance metadata service exploitation, cross-service lateral movement, Lambda function abuse, CloudTrail evasion, or the dozens of misconfiguration patterns that only exist in cloud-native infrastructure.

The confusion comes from a real overlap, not an imagined one. SSRF vulnerabilities, exposed API endpoints, and misconfigured storage buckets appear in both a web app scope and a cloud scope. The overlap sits only at the edges, though. Everything behind those edges lives inside the cloud layer itself and falls outside what a web app tester is scoped to touch.

The 2019 Capital One breach shows exactly where that edge falls. An SSRF vulnerability in a Web Application Firewall let the attacker reach the EC2 instance metadata service, pull temporary IAM credentials off it, and exfiltrate data from S3. A web app penetration test would have found the SSRF itself. The credential theft from the metadata service, the IAM permission enumeration that followed, and the S3 access that came after all required cloud-native methodology that sat outside that test's scope.

A CSPM tool flags overly permissive policies, but it does not test whether those policies are actually exploitable, does not chain individual findings into a realistic attack path, and does not surface the organization-specific trust relationships that a manual tester uncovers by learning how a particular environment actually works. Closing that gap takes a cloud-native assessment built to test IAM directly.

IAM as the dominant attack surface in AWS breaches

AWS has no traditional network perimeter in the way a data center does. Access to compute, storage, and data all runs through identity and permissions instead.

Part of the reason is cultural rather than technical. Writing an IAM policy well is a high-skill task, but most organizations treat it as a low-skill one: developers write a policy to unblock a feature they're shipping, not to model the permission boundary that feature should actually have. AWS managed policies compound this, since most of them are over-scoped for the specific use case they get attached to, and the plan to clean that up after launch rarely survives contact with the next sprint.

Permissions also accumulate on their own, structurally, without anyone deciding they should. Roles pick up extra permissions during incident response, during debugging sessions, during one-off migrations that needed broad access for a weekend. CI/CD pipelines collect permissions as they deploy to more and more services over time, and removing rights from a role is organizationally harder than adding them, so the accumulation runs in one direction.

Even when permissions are reviewed, understanding what a given identity can actually do is not straightforward. Conditions, resource ARNs, and trust policies interact in ways that are genuinely hard to reason about by reading policy documents alone. "What can this role actually do" sounds like a simple question and almost never has a simple answer.

It's a path into every service that account touches, not a localized misconfiguration sitting in one corner of the account.

How harmless IAM permissions chain into AdministratorAccess

Diagram: How Three Permissions Chain Into AdministratorAccess. Visualizes: Show the step-by-step privilege escalation chain in which individually innocuous IAM permissions combine into full administrative access.

AWS IAM privilege escalation rarely comes down to one misconfigured setting. It comes from individually innocuous permissions chained together into a path from a low-privilege identity to full administrative access, where no single step in the chain looks like an attack on its own.

The attack model starts small on purpose. An adversary begins with low-privilege credentials, which might be a developer's access key, a CI/CD role token, or credentials pulled from a compromised EC2 instance profile. From there, the attacker combines IAM permissions to reach administrative access without ever being granted admin rights directly.

iam:PassRole is the permission at the center of the most common path, and on its own it does essentially nothing. It only lets a principal hand off, or delegate, a role to an AWS service. Chained with lambda:CreateFunction and lambda:InvokeFunction, that same permission becomes dangerous: the attacker creates a Lambda function, assigns it a role with administrator access, invokes the function, and retrieves admin credentials from inside it, gaining full administrative access across every AWS service in every region. That exact pattern has shown up in published assessment reports.

The same logic runs through EC2 instead of Lambda. Combining ec2:RunInstances, iam:PassRole, and ssm:StartSession lets an attacker launch an EC2 instance with an administrator instance profile attached, open an SSM session into it, and operate as the administrator role from inside it. The ECS version of the same chain uses iam:PassRole together with ecs:RegisterTaskDefinition and ecs:RunTask.

A separate family of paths skips compute services entirely and targets policy objects directly. iam:CreatePolicyVersion on a shared policy lets an attacker write a new version of that policy granting full access, then set it as the default version. Every principal already attached to that policy inherits the new, over-privileged permissions. This path is particularly hard to catch because it never creates a new IAM user or role, so any detection built only to watch for new identities misses it entirely.

Direct policy attachment permissions, iam:AttachUserPolicy, iam:AttachRolePolicy, and iam:AttachGroupPolicy, create an even more direct route: an attacker with one of these can attach AdministratorAccess straight to themselves or to a role they already control. This is common in roles that were built to manage application-specific roles, where a developer wrote "Resource": "*" instead of scoping the permission to a path prefix or naming convention that would have limited it.

A handful of other chains round out the common list. On a powerful role, iam:UpdateAssumeRolePolicy lets an attacker rewrite who is allowed to assume that role, then assume it themselves. iam:CreateAccessKey, when it applies to any IAM user rather than just the calling principal, lets an attacker generate credentials for a more privileged user directly and use them without any further escalation step. iam:SetDefaultPolicyVersion allows a rollback to a previous policy version, and if an older version granted broader access that was supposedly removed but never properly cleaned up, that access comes back to life. lambda:UpdateFunctionCode on a function running with a privileged execution role lets an attacker rewrite that function's code, inheriting its privileges the next time it runs, a path that occurs often on CI/CD pipeline roles scoped to update any function rather than just the ones they were meant to deploy.

A systematic research study manually extracted permission-flow templates from a large corpus of AWS operations to model every known escalation category, confirming that the space of possible paths is large and that no single published list exhausts it. The paths above are common and well documented, but they are representative of the chain logic, not a ceiling on it.

Escalation paths that reach beyond a single account's IAM policies

The chain logic described above does not stop at the edge of one AWS account. In mature, multi-account AWS deployments, the most dangerous escalation paths cross account boundaries, abuse organization-level trust relationships, and exploit logging blind spots that erase evidence of the escalation after it happens.

Service Control Policies are meant to act as a hard ceiling on what any account inside an organization can do, but a misconfigured SCP can allow IAM modifications it was specifically designed to block. A member account with an unexpected gap in its SCP coverage can escalate privileges that the organization's top-level controls were supposed to prevent entirely.

The management account sits at the top of that trust structure, and it carries the most risk precisely because it's rarely tested with the same rigor as member accounts. Roles in member accounts that can be assumed from the management account, or the reverse, give an attacker a way to walk across that trust boundary once they've gained a foothold anywhere in the organization.

Logging introduces its own blind spot. When the centralized CloudTrail trail can be written to from a member account, an attacker who has already escalated privileges inside that account can suppress or alter audit logs at the organization level, which erases the detection evidence for the entire breach, not just their own account. IAM Identity Center, formerly known as AWS Single Sign-On, adds another layer of risk through its permission sets, which grant access across multiple accounts at once and typically get far less scrutiny than individual account IAM policies do. Missing CloudTrail logging means IAM changes happen invisibly, and missing GuardDuty means credential theft, unusual API activity, and scanning behavior all go undetected.

These deeper, cross-account chains typically start from the same entry point described earlier: an SSRF vulnerability that reaches the metadata service and hands over a set of IAM credentials. What happens after that initial foothold is where single-account thinking runs out and organization-level exposure takes over.

SSRF as the most commonly missed bridge between the application and the IAM layer

SSRF is the finding most often left half-investigated in engagements scoped only to the web application, because the real damage doesn't come from what SSRF does inside the application. It comes from what SSRF retrieves from the metadata service and what those retrieved credentials can then do once they're inside IAM.

The mechanism is specific and well understood. An SSRF vulnerability on an EC2 instance can reach the instance metadata service at the address 169.254.169.254 and pull the IAM role credentials attached to that instance. If that instance role carries more permission than it needs, which it routinely does given how IAM policies tend to accumulate, those stolen credentials can unlock S3, RDS, other connected services, and in some cases a further path to assuming admin roles.

The Capital One breach remains the clearest real-world demonstration of this exact bridge. The SSRF vulnerability itself fell within web application scope and was findable by a standard web app test. The credential retrieval from the metadata service and the S3 exfiltration that followed both required cloud-native methodology that sat outside that test entirely.

A web app penetration test that includes SSRF testing will follow that finding to the metadata endpoint, since that's the natural overlap point. IAM enumeration, privilege escalation testing, storage bucket access review, cross-service lateral movement, and logging and detection validation all sit past that point, and none of them are part of a standard web app scope. They need a separate, cloud-native methodology built specifically to test the IAM layer.

What static misconfiguration scanning catches

CSPM platforms and CIEM tools do real work at scale: they flag overly permissive IAM policies and wildcard permissions, identify unused credentials and inactive access keys, check accounts against CIS benchmark compliance and known misconfiguration patterns, and produce findings across an entire account in a fraction of the time manual review would take.

What these tools cannot do is model the multi-step chains a real adversary executes, because those chains are not individual misconfigurations sitting in isolation. They are emergent properties of permission combinations, where each individual permission looks entirely legitimate on its own and only becomes dangerous next to a specific set of others.

Automated scanning structurally misses multi-step chains where each individual permission appears legitimate in isolation. It misses organization-specific trust relationships and permission combinations that only become visible to a manual tester who has spent time understanding how a particular environment actually operates. It cannot confirm exploitability: a tool flagging that a permission combination "could allow escalation" is not the same as a tester demonstrating the actual commands run, the credentials obtained, and the services reached as a result. And it misses cross-account and organization-level paths, which require understanding the trust graph connecting accounts together, not just reading the policy text inside any one of them.

A misconfiguration review answers one question: what's configured wrong. A penetration test answers a different one: what an attacker could actually do with it. Both have a place in a security program, and both produce real evidence, but they serve different purposes and carry different weight as compliance evidence for an audit or an enterprise security review.

Sources

  1. AWS IAM Privilege Escalation: 7 Paths We Find in Every Assessment
  2. Introducing Pathfinding.cloud | Datadog Security Labs
  3. pathfinding.cloud - IAM Privilege Escalation Paths (AWS)
  4. pathfinding.cloud - Understand, Detect & Demonstrate AWS IAM Privilege Escalation
  5. How Cloud Privilege Escalation Paths Form | tech-explainer | SC Media
  6. AWS IAM Privilege Escalation – Methods and Mitigation
  7. SkyEye: When Your Vision Reaches Beyond IAM Boundary Scope in AWS Cloud

More in Post-Exploitation