Summary
Hulumi versions before 1.3.2 contain a privilege escalation weakness in the weekly integration IAM policy. An attacker using the documented principal may create persistent roles with elevated privileges in the sandbox account when the policy permits role lifecycle operations without adequate permission boundaries.
Affected context
The vulnerability occurs in deployments using Hulumi's weekly integration IAM policy, particularly where the policy grants role lifecycle permissions for roles matching the af-e2e-* naming pattern. Risk depends on whether an attacker can act as the documented principal and whether created roles are constrained by permission boundaries, trust policies, or equivalent organizational controls in the sandbox account.
Exploit preconditions
- Attack surface: Cloud IAM role-management operations in the sandbox account
- Required access: Ability to use or assume the documented integration principal
- Trigger point: Creation or modification of an af-e2e-* IAM role
- Why exploitation is possible: The policy permits role lifecycle operations without sufficient boundary restrictions, allowing a persistent role with greater effective privileges to be created
Why this happens
The underlying flaw is excessive IAM authority combined with insufficient privilege-boundary enforcement. A principal intended for weekly integration activities can perform lifecycle operations on a broad role namespace without ensuring that newly created or modified roles remain within an approved privilege ceiling. This behavior maps to CWE-269, Improper Privilege Management, because authorization controls allow capabilities beyond the principal's intended operational scope.
Potential impact
- An attacker may create persistent roles with elevated permissions
- The sandbox account could be accessed or modified beyond intended limits
- Cloud resources or sensitive configuration may be changed or exposed
- The compromised principal could support lateral movement within permitted account boundaries
- Security monitoring and governance controls could be weakened
General mitigation guidance
Mitigation generally focuses on reducing IAM authority and enforcing
privilege ceilings for all role lifecycle operations.
Common defensive patterns include:
- Granting only the specific role actions and resource names required by the integration
- Enforcing mandatory permission boundaries on created or modified roles
- Restricting role trust policies and preventing self-escalating delegation paths
- Separating role creation, role update, and role assumption responsibilities
- Applying least privilege to the integration principal and using short-lived credentials where practical
- Adding organization-level policies that deny unapproved role capabilities
- Treating naming-pattern restrictions as supplemental controls rather than the sole authorization boundary
How teams detect issues like this
Organizations can identify similar weaknesses through:
- Static and policy analysis for wildcard role resources or unrestricted IAM lifecycle actions
- Code review checks for missing permission-boundary requirements on role creation
- Verification that integration principals cannot create roles with broader permissions than their own intended scope
- Cloud audit-log monitoring for role creation, policy attachment, trust-policy changes, and unusual use of the documented principal
- Preventive policy enforcement that rejects roles lacking approved boundaries, trust relationships, or permission sets
- Automated IAM review tools that model effective permissions and escalation paths

