An IAM Misconfiguration That Let a Developer Become Admin

A developer with iam:PassRole and lambda:CreateFunction permissions silently escalated to full AdministratorAccess in 10 minutes.

Overview

Three ordinary-looking Lambda permissions added up to full admin access, and a contractor's scanner found it before anyone used it.

What happened

A routine IAM access review turned up a platform developer with iam:PassRole, lambda:CreateFunction and lambda:InvokeFunction. For someone who managed Lambda deployments, each looked reasonable. The review first missed that together they allow full privilege escalation.

The catch came later. A pen test contractor ran Cloudsplaining, a tool that scans IAM policies for risky permissions, and it reported the escalation path. Nobody had ever exploited it.

Key concepts

  • Privilege escalation
  • iam:PassRole
  • Permission boundary
  • Cloudsplaining

Interview questions

  • How do you prevent IAM privilege escalation through Lambda and iam:PassRole?

Sign up free to read the full topic

More War Stories topics

Start free on Cariara · Coding problems · System design studio