Security1 publisher2 min readPublished
Scoped identity with iam:PassRole could potentially run as prod-admin via a Lambda function it creates, if unblocked by policy controls
Permission-by-permission review scores iam:PassRole, lambda:CreateFunction and lambda:InvokeFunction as controlled access, while path analysis sees one route to whatever the passed role holds. Three policy layers decide whether that route is live.
The Watch · Security desk

What happened
- An identity holding iam:PassRole on prod-admin, lambda:CreateFunction and lambda:InvokeFunction can create a function, attach prod-admin to it, invoke it, and operate with that role's permissions.
- Permission-by-permission review classifies the same three grants as controlled access, on the grounds that the identity cannot directly read sensitive data or modify critical resources.
- AWS documents iam:PassRole as a permission that must be evaluated in combination with others, because it lets an identity attach a role with broader permissions than its own to a resource it controls.
Compiled by The WatchSomething wrong?How this is made
Why it matters
- constraint A permission inventory cannot answer whether an identity is administrator-equivalent. The artifact that closes the audit leaves the owner without a statement of what the identity can reach.
- decision Scoping PassRole to named execution roles is an edit to policy text at grant time. Whoever writes deployment policy owns that edit.
- exposure In any account where an administrative role's trust policy admits lambda.amazonaws.com, every identity that can pass that role and create a function already holds it in practice.
- capability Because three separate policy layers can each close the path, defenders get a cheap containment option that does not require revoking the deployment permissions developers use.
Taken one at a time, each of the three permissions is defensible: PassRole is delegation, CreateFunction is deployment, InvokeFunction is operation. Together they are a route to administrator. Finding it takes a three-way correlation a permission list does not contain: which roles the identity is allowed to pass, what those roles' trust policies permit, and which compute resources the identity can create or modify [9]. AWS's own documentation is the reason the join matters. The permission lets an identity attach a role with broader permissions than its own to a service or resource it controls. AWS says it has to be evaluated in combination with other permissions [5]. On its own it grants nothing; escalation needs the second half, control of something that will execute under the delegated role [6].
The trust policy is the first gate. prod-admin has to name lambda.amazonaws.com as a principal allowed to assume it [8]. IAM conditions or a permission boundary on the delegating identity can stop it, and so can a service control policy on the account [4]. The path is only exploitable if none of those three blocks it [12]. A path-analysis hit is therefore a candidate until someone reads policy in three places.
Lambda is one of several execution surfaces. EC2 instances and ECS tasks run with an assigned IAM role the same way [7], so closing the Lambda variant and stopping there leaves the instance profile and task role versions of the same delegation in place.
The remediation is policy text. Replace PassRole on * with the specific roles an identity operationally needs [10]. For deployment automation, that means Lambda execution roles and none of the broad administrative ones [10]. The scworld.com explainer says narrowing role trust policies to specific services and adding conditions such as iam:PassedToService limits which roles can be delegated and into which service contexts. The same explainer says the constraint does not block legitimate automation [11].
That explainer describes the pattern and its controls, and reports no incident, actor or affected organisation. The test it sets for tooling is whether the analysis can flag an identity holding both resource-control permissions and delegation permissions aimed at roles broader than its own. The second half of the test is validating that path against trust policies, permission boundaries and SCPs [15]. Without that correlation, PassRole in a review looks like routine automation enablement [9].
What to watch
- A published intrusion using the PassRole-plus-CreateFunction chain would make this a campaign. The current material reports none.
- Whether access review exports start recording which roles an identity can pass, on top of the bare fact that it holds iam:PassRole.
- Whether EC2 instance profile and ECS task role variants get the same scoping treatment as the Lambda one.