Est.

IAM Policy Review and Privilege Escalation Testing in SaaS Cloud Environments

Graph analysis finds the permission chains that become admin access.

· 7 min read
Cover illustration for “IAM Policy Review and Privilege Escalation Testing in SaaS Cloud Environments”
Whitebox Penetration Testing · November 17, 2026 · 7 min read · 1,679 words

IAM policy review and privilege escalation testing in SaaS cloud environments must answer more than whether permissions look too broad. They must establish which permissions an attacker can chain into working admin access. Configuration analysis finds candidates. A thorough penetration test proves that the attacker can reach that access, shows the damage they could do, and finds the permission change that breaks the path.

Why IAM policy review without exploit proof leaves the real question unanswered

An overprivileged role that no principal can assume is not an exploitable path. A reachable overprivileged role is a different problem. If an attacker can get from a realistic foothold to that role, its permissions become part of the attacker's reach.

A checklist can identify a role with AdministratorAccess without establishing that connection. It can also flag separate permissions without discovering that they combine into admin access. Both gaps distort the result. One makes a configuration concern look like a confirmed vulnerability, while the other leaves a working attack path hidden among ordinary policy statements.

Cloud penetration testing resolves that uncertainty by testing the route from initial access to higher privilege. It establishes which permissions enable each step and what the attacker can reach after completing the chain. That is a different task from checking compliance with a policy standard. The standard describes the desired configuration, while the test demonstrates the consequences of the configuration that exists.

How IAM misconfigurations accumulate in SaaS cloud environments and why they resist manual detection

SaaS teams write IAM policies to solve immediate access problems. A workload needs to launch a service, invoke a function, or use a role, so a permission gets added. The accumulated effect is harder to see. Grants spread across statements and policy documents, while a pull request often exposes only the policy being changed. That view leaves out combinations with grants elsewhere in the account.

The Lambda example makes the problem concrete. A principal with lambda:CreateFunction, lambda:InvokeFunction, and iam:PassRole against all resources can create a function, attach a role, and invoke the function as that role. If an administrator role trusts Lambda, the combination creates a route to admin access.

The same structural problem appears outside AWS. Azure service principals created for one-off tasks accumulate contributor-level permissions and never get rotated. In GCP, iam.serviceAccounts.actAs on a high-privilege service account raises the same concern because it lets a principal act through another identity. Dormant access keys add another entry point. Their last-used timestamps show when they were used in the past, so an access review based on those timestamps cannot show what stolen credentials could reach today.

Diagram: The Lambda Privilege Escalation Chain. Visualizes: Show a step-by-step attack chain demonstrating how three permissions combine into full admin access.

What the IAM privilege escalation path catalogue actually covers

PassRole-based escalation combines iam:PassRole with a service launch permission. Relevant permissions include ec2:RunInstances, lambda:CreateFunction, glue:CreateJob, ecs:RunTask, codebuild:CreateProject, sagemaker:CreateTrainingJob, datapipeline:CreatePipeline, and cloudformation:CreateStack. The route runs through a workload. The holder attaches a high-privilege role and executes code with that role's permissions.

Policy manipulation covers iam:CreatePolicyVersion, iam:AttachRolePolicy, iam:PutUserPolicy, and iam:PutRolePolicy. These actions can inject permissions into the holder's policy or another principal's policy. Trust rewriting targets a different control. With iam:UpdateAssumeRolePolicy, a principal can change a role's trust relationship to make themselves a trusted entity.

Permission boundary changes remove or weaken a constraint. iam:DeleteRolePermissionsBoundary removes a role's boundary, while iam:PutRolePermissionsBoundary can replace it with a weaker one. Creating credentials with iam:CreateAccessKey or iam:CreateLoginProfile for a higher-privilege user gives access through that identity more directly. Group membership abuse uses iam:AddUserToGroup to place a user in a privileged group.

Lateral execution does not need to change IAM policies. SSM Session Manager through ssm:StartSession, EC2 Instance Connect, and hijacking existing Lambda functions, Glue endpoints, or CodeBuild projects can provide equivalent escalation. Wildcards widen the available routes. For example, iam:Put* includes iam:PutUserPolicy, while a NotAction exclusion of iam:* against all resources grants every non-IAM action, which in effect gives admin access for most workloads.

An unconditional Deny on iam:PassRole blocks every direct PassRole path, but it does not block routes through service-linked roles or services that bypass the PassRole check. A conditional Deny needs request context to evaluate.

Why graph-based path analysis is the only way to find escalation chains at account scale

An account-wide escalation search needs to connect permissions across policies and principals. Reading documents one at a time cannot reliably do that. A graph represents each principal as a node and each permission combination that lets one principal act as or modify another as a directed edge. A path from a low-privilege node to a high-privilege node describes an escalation chain.

PMapper, short for Principal Mapper, models AWS IAM users and roles this way. It maps which principals can escalate to others by examining the applicable policies. Separate grants become one traversable connection. A principal's PassRole permission in one policy and Lambda creation permission in another can therefore appear together in the path analysis, even when the grants came through different attachments.

A cloud security posture management tool may find a public S3 bucket or a misconfigured security group without modeling the routes an attacker could take from an initial identity. AWS IAM Access Analyzer generates findings for external access, internal access, and unused permissions, but does not automatically discover every multi-step escalation chain. Cloudsplaining identifies dangerous actions in specific policy statements. Those results complement the graph.

Role trust policies that allow external-account principals without condition constraints can connect identities across account boundaries. Role chaining can take those routes further, even where there is no audit logging. The account boundary is not necessarily the attack boundary. Modeling only the starting account can leave the rest of the path out of view.

How automated IAM analysis fits into a real penetration test — and where it stops

A graph gives paths to check before they can be confirmed as vulnerabilities. A certified human expert still has to establish whether a plausible attacker can reach the starting identity and complete the route. Some paths fail under real conditions. Others depend on application behavior that an IAM policy model cannot describe, so the tester needs more than a diagram of permissions.

Conditional Deny illustrates the limit of static analysis. A tool can identify a condition as a possible blocker, but evaluating it requires the request context. The tester checks whether the Deny actually applies. Similarly, an overprivileged service role may be reachable only through a particular application workflow, making the application's architecture part of the security analysis.

Whitebox access gives the tester source code, cloud configurations, and architecture documentation needed to investigate those connections. Blackbox testing's visibility into policy contents is limited to what enumeration reveals, limiting what it can establish about account-wide escalation. A cloud security review can identify an overly permissive role, while a penetration test investigates whether it can be abused and whether other weaknesses make it reachable.

SSRF shows why application and IAM testing belong together. SSRF that reaches the instance metadata endpoint through IMDSv1 can expose IAM credentials. If the instance role is overprivileged, those credentials can turn an application weakness into a privilege escalation path. Testing the two areas separately can miss the chain. The working exploit is what connects the workload vulnerability, the stolen authority, and the resulting access.

What a confirmed privilege escalation finding looks like in a deliverable

A confirmed finding records the path the tester took in the account under test. It identifies every principal traversed, every permission used, and the policy statement or inline policy that granted it. It also includes a reproducible sequence of API calls that reached admin access and the CloudTrail events produced.

That level of detail gives the remediation team something precise to change. If the report only says a role has AdministratorAccess, it records a configuration observation. If it demonstrates how a compromised Lambda execution role reaches admin, it establishes a vulnerability.

The finding also needs a concrete blast radius. Specific S3 buckets, RDS instances, secrets in Secrets Manager, and resources reachable through cross-account roles explain what the gained authority exposes. A CTO or auditor should not have to infer that impact from action names.

Remediation should name the smallest permission change that breaks the path. Depending on the demonstrated route, that could mean restricting PassRole with an iam:PassedToService condition, removing iam:AttachRolePolicy, or replacing AdministratorAccess with a scoped inline policy. “Follow least privilege” is not a usable fix. The recommendation has to target the permission or trust relationship that made this particular chain possible.

Embedding IAM privilege escalation checks into the development lifecycle before findings reach production

A point-in-time IAM test starts losing coverage as new code, integrations, and policies ship. Infrastructure-as-code pull requests are the place to catch a new PassRole and Lambda creation combination before it reaches production. Waiting for the annual penetration test leaves new paths untested since the last assessment.

KloudSec's open-source iam-to-english CLI, released October 2026, translates IAM JSON into plain-English descriptions, detects known escalation paths across statements, and compares policy changes. It can fail a CI pipeline on a critical finding. It checks the policy document entirely offline. That makes its scope important to understand, because a document-level result is not an account-wide reachability assessment.

The aws accessanalyzer validate-policy command provides another CI/CD check for policy grammar errors and security warnings, including overly permissive patterns. It is a native, free control scoped to a single policy document. CI catches syntax and known patterns, while account-wide testing evaluates the combined IAM state and whether an attacker can use it.

For teams operating under SOC 2, HIPAA, or ISO 27001, continuous scanning also creates an audit trail of ongoing monitoring. Collaboration around findings can continue through a dedicated messaging channel, with on-demand retesting when remediation is ready. A closed ticket is not proof of closure. The retest must establish that the original path is blocked and that the change has not introduced another route.

The mature cadence combines CI scanning on every IAM policy change with full graph-based penetration tests at meaningful inflection points, including pre-launch, after major infrastructure changes, and before enterprise audits. Retesting then validates the fixes against the actual account. Each layer answers a different question at a different time.

More in Whitebox Penetration Testing