1. Resources
  2. Detection rules
  3. IAM Permissions Boundary Removed or Replaced

IAM Permissions Boundary Removed or Replaced detection rules

An attacker with IAM write access deletes the permissions boundary of a user or role, or swaps it for a broader policy, so that the policies already attached to that identity apply in full.

Platform
AWS
Severity
High
Log source
AWS CloudTrail
Last updated
Rule formats
Sigmaand queries for: SplunkMicrosoft SentinelIBM QRadar
What an attacker needs
Permission to delete or replace the permissions boundary of a user or role the attacker controls or can assume, whose attached policies grant more than the boundary allowed.
Impact
The target's identity-based policies apply without the cap, which in delegated administration setups often means administrator rights.
Response
Set the approved boundary on the user or role again, then contain the identity that gained from the change and the principal that made it.
Mitigation
Deny the boundary delete actions to delegated administrators, and allow the Put actions only with the iam:PermissionsBoundary condition key set to the approved policy.
CloudTrail events
DeleteUserPermissionsBoundaryDeleteRolePermissionsBoundaryPutUserPermissionsBoundaryPutRolePermissionsBoundary

How the attack works

A permissions boundary is a managed policy set on an IAM user or role that caps what its identity-based policies can grant: the identity can do only what both the policies and the boundary allow. Organizations use boundaries to delegate IAM work, letting a team create roles and attach policies, even broad ones, because the boundary keeps the result inside agreed limits. DeleteUserPermissionsBoundary and DeleteRolePermissionsBoundary remove that cap. PutUserPermissionsBoundary and PutRolePermissionsBoundary set a boundary or replace the current one with another policy, which can be a much broader one.

A principal allowed to call these on its own user, or on a role it can assume or pass to a service, escalates in one call when the identity already has a broad policy attached, such as AdministratorAccess behind a restrictive boundary. Nothing is attached and no policy document is edited, so controls that watch attachments and policy changes miss it. CloudTrail records the calls under iam.amazonaws.com with the caller in userIdentity and the target in requestParameters.userName or requestParameters.roleName; the Put calls also carry the ARN of the new boundary policy (API parameter PermissionsBoundary).

What an attacker needs

  • Credentials for a principal allowed to call iam:DeleteUserPermissionsBoundary, DeleteRolePermissionsBoundary, PutUserPermissionsBoundary or PutRolePermissionsBoundary on the target.
  • A target whose attached policies grant more than its boundary allowed, and that the attacker controls, can assume or can pass to a service.

Impact

The target's identity-based policies apply without the cap, which in delegated administration setups often means administrator rights. Service control policies still apply, so the gain stops at whatever the organization denies.

Detection rules

IAM Permissions Boundary Removed from a User or Role

Detects DeleteUserPermissionsBoundary and DeleteRolePermissionsBoundary calls, which remove the cap a permissions boundary puts on a user or role. The identity's attached policies then apply in full. Compare the caller (userIdentity.arn) with the target in requestParameters.userName or roleName. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelHighStatusExperimentalLog sourceAWS CloudTrail
title: IAM Permissions Boundary Removed from a User or Role
id: fd238f0f-ca5e-40b9-a141-1ba4afb91da6
status: experimental
description: >-
  Detects DeleteUserPermissionsBoundary and DeleteRolePermissionsBoundary
  calls, which remove the cap a permissions boundary puts on a user or role.
  The identity's attached policies then apply in full. Compare the caller
  (userIdentity.arn) with the target in requestParameters.userName or
  roleName.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteUserPermissionsBoundary.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_DeleteRolePermissionsBoundary.html
  - https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
author: Forestall
date: 2026-11-11
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.003
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName:
      - DeleteUserPermissionsBoundary
      - DeleteRolePermissionsBoundary
  condition: selection
falsepositives:
  - Planned retirement of a boundary by the identity team, and infrastructure-as-code updates that drop the boundary from a role definition; confirm the change record and review the target's attached policies.
level: high

False positives

  • Planned retirement of a boundary by the identity team, and infrastructure-as-code updates that drop the boundary from a role definition; confirm the change record and review the target's attached policies.

IAM Permissions Boundary Set or Replaced on a User or Role

Detects PutUserPermissionsBoundary and PutRolePermissionsBoundary calls, which set a permissions boundary or replace the current one. A replacement with a broader policy widens what the identity can do; a first boundary or a narrower one is hardening. Compare the new boundary policy in requestParameters with the previous one. It also matches attempts that failed (errorCode present): check errorCode, because an unauthorized attempt is worth seeing.

LevelMediumStatusExperimentalLog sourceAWS CloudTrail
title: IAM Permissions Boundary Set or Replaced on a User or Role
id: 032bceb1-8694-45df-8b8d-8d44c2738090
status: experimental
description: >-
  Detects PutUserPermissionsBoundary and PutRolePermissionsBoundary calls,
  which set a permissions boundary or replace the current one. A replacement
  with a broader policy widens what the identity can do; a first boundary or a
  narrower one is hardening. Compare the new boundary policy in
  requestParameters with the previous one.
  It also matches attempts that failed (errorCode present): check errorCode,
  because an unauthorized attempt is worth seeing.
references:
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutUserPermissionsBoundary.html
  - https://docs.aws.amazon.com/IAM/latest/APIReference/API_PutRolePermissionsBoundary.html
  - https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html
author: Forestall
date: 2026-11-11
tags:
  - attack.persistence
  - attack.privilege-escalation
  - attack.t1098.003
logsource:
  product: aws
  service: cloudtrail
detection:
  selection:
    eventSource: iam.amazonaws.com
    eventName:
      - PutUserPermissionsBoundary
      - PutRolePermissionsBoundary
  condition: selection
falsepositives:
  - Boundaries applied or updated by the identity team or infrastructure-as-code pipelines, which is the normal use of these calls; allow-list those callers and review changes made by anyone else.
level: medium

False positives

  • Boundaries applied or updated by the identity team or infrastructure-as-code pipelines, which is the normal use of these calls; allow-list those callers and review changes made by anyone else.

Triage

  • Identify the caller (userIdentity.arn) and the target (requestParameters.userName or roleName); a principal changing the boundary of its own user, or of a role it can assume, is the key signal.
  • For Put calls, compare the new boundary policy with the previous one. Setting a boundary where none existed, or a narrower one, is hardening.
  • List the policies attached to the target to see what the change released, and review what the target did afterwards.
  • If not approved, set the previous boundary again and remove the caller's permission to change boundaries.

Response

Once the attack is confirmed:

  1. Set the approved boundary on the user or role again. Permissions are evaluated on every request, so the cap also applies to sessions of the identity that already exist.
  2. Contain the identity that gained from the change and the principal that made it. Deactivate their access keys, and revoke the active sessions of roles, until you know who used them.
  3. Review what the target did while it had no boundary and remove what it created. Users, roles, access keys and policy changes from that time are not undone when the boundary is back.
  4. Check that the boundary policy itself was not changed through a new or a different default version, and that no other identity lost or changed its boundary in the same period.
  5. Take the permission to delete or replace boundaries away from the caller, and confirm in CloudTrail that the boundary stays in place.

Mitigation

  • Deny iam:DeleteUserPermissionsBoundary and iam:DeleteRolePermissionsBoundary to delegated administrators, and allow the Put actions only with the iam:PermissionsBoundary condition key set to the approved boundary policy, as in the delegation example in the AWS documentation.
  • Deny changes to the boundary policies themselves (iam:CreatePolicyVersion, SetDefaultPolicyVersion, DeletePolicy and DeletePolicyVersion on those policies).
  • Put limits that must hold whatever happens inside the account in service control policies; a boundary is only as strong as the IAM permissions around it.

Frequently asked questions

Why do controls that watch policy attachments miss this change?

Nothing is attached and no policy document is edited. The identity already had a broad policy, for example AdministratorAccess behind a restrictive boundary, and removing or replacing the boundary lets that policy apply in full. Only the four boundary calls show the change, and those are what the rules match.

Is every PutRolePermissionsBoundary or PutUserPermissionsBoundary event a problem?

No. Setting a boundary where none existed, or replacing one with a narrower policy, is hardening and the normal use of these calls. The rule cannot judge the direction of the change. Compare the new boundary policy with the previous one and look at who the caller is.

Does removing a boundary make the identity an administrator?

Only if its attached policies grant that. Without the boundary the identity-based policies apply in full, which in delegated administration setups often means administrator rights. Service control policies still apply, so the gain stops at whatever the organization denies.

References

We respect your privacy

We use cookies to keep this site secure and working properly. With your permission, we also use optional cookies to understand usage and improve the experience. Cookie Policy

You can change your choice at any time.