GCP_CAN_SET_FOLDER_IAMPOLICY
Summary
FSProtect ACL Alias
GCP_CAN_SET_FOLDER_IAMPOLICY
GCP Alias
IAM & Hierarchy Control
Affected Object Types
Folders
Exploitation Certainty
Certain
Granting Roles
roles/owner, roles/resourcemanager.organizationAdmin, roles/resourcemanager.folderAdmin, roles/resourcemanager.folderIamAdmin, roles/iam.securityAdmin
Description
GCP_CAN_SET_FOLDER_IAMPOLICY indicates that an identity can call setIamPolicy on a GCP Folder. Folders are intermediate containers in the GCP resource hierarchy that sit between the Organization and Projects. A principal who can set IAM policy on a folder gains control over every project nested beneath that folder.
An attacker with this edge can grant themselves broad roles on the folder, which inherit down to all child projects and their resources. The blast radius depends on how many projects live under the targeted folder.
Key abuse scenarios:
Grant
roles/ownerto a controlled identity at folder scope, inheriting to all child projects.Add a backdoor service account as
roles/resourcemanager.folderAdminfor persistence.Grant
roles/iam.serviceAccountTokenCreatoron service accounts scoped under the folder.
Identification
gcloud CLI
GCP Console
Open GCP Console → IAM & Admin → IAM.
Select the target Folder from the resource selector.
Review all principals with
Owner,Folder Admin, orFolder IAM Adminroles.
Exploitation
gcloud CLI
Compound path: Folder-level setIamPolicy → grant roles/iam.serviceAccountTokenCreator on all service accounts under the folder's projects → impersonate high-privilege SAs.
Mitigation
Limit folder IAM admin roles to dedicated admin accounts with MFA enforced.
Use Privileged Access Manager for just-in-time elevation of folder-scoped roles.
Apply
constraints/iam.allowedPolicyMemberDomainsat the org level to prevent granting access to external identities.Regularly audit folder IAM policies:
Detection
Admin Activity
SetIamPolicy
resource.type=folder, methodName=SetIamPolicy
Alert on:
SetIamPolicycalls on folder resources.New bindings adding
roles/owner,roles/resourcemanager.folderAdmin, orroles/resourcemanager.folderIamAdmin.
References
https://cloud.google.com/resource-manager/docs/access-control-folders
Last updated
Was this helpful?