For the complete documentation index, see llms.txt. This page is also available as Markdown.

AWS_UPDATE_TRUST

Summary

Forestall ACL Alias

AWS_UPDATE_TRUST

AD Alias

N/A

Affected Object Types

AWSUser|AWSRole → AWSRole

Exploitation Certainty

High

AWS IAM Action

iam:UpdateAssumeRolePolicy

Description

An attacker who holds iam:UpdateAssumeRolePolicy on a role in their own account can take it over on its own. They rewrite the trust policy to trust their principal, then assume the role. In the same account the trust grant alone authorizes the assume — no separate sts:AssumeRole identity permission is required, because a role's trust policy is a resource-based policy and an in-account resource grant is sufficient.

This is why the standalone action is modeled as a takeover edge, not just a "modify" edge. Rewriting the trust is what lets the attacker become the role. It differs from AWS_UPDATE_POLICY_AND_ASSUME, where the attacker changes what the role can do (its permission policy) and therefore also needs the ability to assume it.

The two-action cross-account variant (trust rewrite plus an explicit assume grant) is modeled as AWS_UPDATE_TRUST_AND_ASSUME.

Edge semantics: (Attacker:AWSUser|AWSRole) -[AWS_UPDATE_TRUST]-> (TargetRole:AWSRole)

Precondition: same account. The attacker and the target role live in the same AWS account.

Identification

# Who can rewrite the trust of a role in this account
aws iam simulate-principal-policy \
  --policy-source-arn <attacker-arn> \
  --action-names iam:UpdateAssumeRolePolicy \
  --resource-arns "arn:aws:iam::<account-id>:role/<target-role>"

# Current trust policy of the role
aws iam get-role --role-name <target-role> \
  --query "Role.AssumeRolePolicyDocument"

Exploitation

Mitigation

  • Restrict iam:UpdateAssumeRolePolicy to dedicated IAM administrator roles. Deny it for service and application roles.

  • Use SCPs to block trust policy changes across the organization or on sensitive roles.

  • Apply IAM permission boundaries so a rewritten trust policy cannot exceed the boundary.

  • Use AWS IAM Access Analyzer to flag roles whose trust policies changed.

Detection

CloudTrail Event
Description
Key Fields

UpdateAssumeRolePolicy

The trust policy of a role was modified

requestParameters.roleName, requestParameters.policyDocument, userIdentity.arn

AssumeRole

The role was assumed after the trust change

requestParameters.roleArn, userIdentity.arn

Alert when UpdateAssumeRolePolicy adds a new principal and the same principal calls AssumeRole on that role shortly after.

References

Last updated

Was this helpful?