Cloud IAM: how small permissions become admin

A single harmless-looking cloud permission can open a path to full admin. How IAM privilege escalation works conceptually, and how to close the gaps.

Cloud Security4 min read

In a cloud environment, whoever controls the right identity controls the infrastructure, and they don’t need any network access to do it.

That makes cloud identity and access management (IAM) one of the most important areas in any cloud security test. It is also where one of the most surprising classes of issue turns up: permissions that look small and safe on their own but combine into a path to full administrative control.

Why “least privilege” is harder than it sounds

Everyone agrees with least privilege. In practice, cloud permissions are granular, numerous and constantly changing. Teams grant access to unblock a deployment, a pipeline or a contractor, and rarely go back to tidy up.

The result is usually a collection of reasonable-looking permissions that, read together, allow an identity to give itself more power. No single policy looks obviously dangerous.

The common patterns

The names differ between AWS, Azure and Google Cloud, but the patterns are the same.

1. Editing your own permissions

The most direct path is any permission that lets an identity change policies: attaching a policy to a user or role, creating a new policy version, or adding itself to a group. An identity that can modify what it is allowed to do can grant itself anything.

These permissions are sometimes given to automation or to “IAM helper” roles for convenience, by teams who don’t realise they are effectively admin.

2. Passing a more powerful role to a service

Cloud services often run as a role: a virtual machine, a serverless function or a container task is given an identity to act with. In AWS, the permission that allows this is iam:PassRole; other providers have equivalents.

If a low-privilege identity can create or update a compute resource and also pass it a powerful role, it can run its own code with that role’s permissions. It never held admin rights directly, but it could borrow them.

3. Role assumption chains

Roles can trust other roles. Role A can assume Role B, which can assume Role C. Each trust relationship may look sensible in isolation, yet the chain can lead from a development role to production administration.

Look hardest at cross-account trust: a weakly protected account trusted by a sensitive one becomes a back door.

4. Credential and secret access

Permissions to read secrets stores, parameter stores, instance metadata or deployment variables can expose credentials for more privileged identities. Reading a secret is “read-only”, but what you read may be an admin key.

5. Control of the pipeline

Whoever can change the CI/CD pipeline, or the infrastructure-as-code it deploys, can usually change anything the pipeline’s identity can change. Pipelines often run with broad permissions, so write access to them is very powerful.

6. Modifying code that runs as someone else

Permission to update the code or configuration of an existing function, container or VM image is effectively permission to act as whatever identity that workload runs with.

Why scanners miss the full picture

Configuration scanners are good at flagging individual risky settings: a public bucket, an unused key, an over-broad policy. They are weaker at spotting a path, such as three moderate permissions across two accounts that together end in admin access.

Finding those paths means reasoning about how permissions interact, which identities can reach which others, and what a real attacker would try first. Manual, authenticated testing adds the most value here.

How to reduce the risk

You do not need to rebuild your IAM model to make real progress.

  • Treat permission-management rights as admin. Anything that can change policies, attach roles or modify trust should be held by very few identities and reviewed regularly.
  • Restrict role passing. Limit which roles each identity can pass, and to which services.
  • Map your trust relationships. Draw the role assumption graph, especially across accounts, and remove trusts nobody can justify.
  • Protect the pipeline. Limit who can modify pipelines and infrastructure code, and give pipeline identities only the access each stage needs.
  • Harden metadata access with the hardened instance metadata options your provider offers.
  • Review regularly. Use your provider’s access analysis tools to find unused permissions, and remove them.

What a cloud security test should show you

A good cloud test combines a configuration review with authenticated attack-path testing: it starts from realistic low-privilege identities and shows, with evidence, how far each one can go. It also respects each provider’s testing rules, so testing stays within what AWS, Azure and Google Cloud allow.

Our cloud security testing page explains how we approach this across AWS, Azure and GCP, and our methodology describes how we rate what we find.

To find out how far your least-privileged identity can really go, get in touch and we’ll scope a cloud test.

One practical security note a week.

No spam. Unsubscribe any time.

Need a pentest for an audit, a customer, or peace of mind?

Tell us what you need tested. You’ll get a fixed-fee proposal with tester-days and timeline stated, usually within a few days of the scoping call.