Cloud Security4 min read

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.

In cloud environments, identity is the perimeter. Whoever controls the right identity controls the infrastructure: no network access required.

That is why cloud identity and access management (IAM) is one of the most important areas in any cloud security test. And it is where one of the most surprising classes of issue lives: 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 not usually one obviously dangerous policy. It is a collection of reasonable-looking permissions that, read together, allow an identity to give itself more power.

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. If an identity can modify what it is allowed to do, it can grant itself anything.

These permissions are sometimes given to automation or to “IAM helper” roles for convenience, without realising 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 pass it a powerful role, it can run its own code with that role’s permissions. The identity 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, but following the chain can lead from a development role to production administration.

Cross-account trust deserves particular attention: 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, which makes write access to them 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. What they handle less well is the path: the combination of three moderate permissions across two accounts that ends 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. That is where manual, authenticated testing adds the most value.

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. Use 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: starting from realistic low-privilege identities and showing, 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.

Curious how far your least-privileged identity can really go? Get in touch to 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.