GCP_CAN_SET_PROJECT_IAMPOLICY
Summary
FSProtect ACL Alias
GCP_CAN_SET_PROJECT_IAMPOLICY
GCP Alias
IAM & Hierarchy Control
Affected Object Types
Projects
Exploitation Certainty
Certain
Granting Roles
roles/owner, roles/resourcemanager.organizationAdmin, roles/resourcemanager.folderAdmin, roles/resourcemanager.projectIamAdmin, roles/iam.securityAdmin
Description
GCP_CAN_SET_PROJECT_IAMPOLICY indicates that an identity can call setIamPolicy on a GCP Project. Projects are the primary security and billing boundary in GCP. A principal who can set IAM policy on a project can grant themselves or any identity any role within that project, gaining full control over all the project's resources.
This is one of the most impactful privilege escalation paths in GCP. Even a project-scoped setIamPolicy is dangerous because projects typically contain service accounts, compute instances, Cloud Build pipelines, and Cloud Storage buckets that can be leveraged for further escalation.
Key abuse scenarios:
Grant
roles/ownerto a controlled identity at project scope.Grant
roles/iam.serviceAccountTokenCreatoron a privileged service account within the project.Grant
roles/compute.adminto then create VMs attached to high-privilege service accounts.
Identification
gcloud CLI
GCP Console
Open GCP Console → IAM & Admin → IAM.
Ensure the target Project is selected.
Review principals with
Owner,Project IAM Admin, orSecurity Adminroles.
Exploitation
gcloud CLI
Compound path: GCP_CAN_SET_PROJECT_IAMPOLICY → grant roles/iam.serviceAccountUser + roles/compute.admin → GCP_CAN_ACT_AS_SA + GCP_CAN_CREATE_COMPUTE → spin up VM attached to privileged SA → extract SA token from metadata server.
Mitigation
Remove
roles/ownerfrom human users in production projects; use purpose-specific roles.Restrict
roles/resourcemanager.projectIamAdminto automation accounts and break-glass identities only.Enable
constraints/iam.managed.allowedPolicyMembersat the org level.Audit project IAM policies:
Use VPC Service Controls to limit data exfiltration even after project compromise.
Detection
Admin Activity
SetIamPolicy
resource.type=project, methodName=SetIamPolicy
Alert on:
New
roles/ownerbindings on projects.SetIamPolicycalls by identities not part of a known automation system.Bindings added for external (non-org) identities.
References
https://cloud.google.com/resource-manager/docs/access-control-proj
Last updated
Was this helpful?