Skip to content

[HIGH] spored role grants unconditioned ec2:CreateTags on * → tag-then-terminate escalation #174

Closed

Description

@scttfrdmn

Severity: HIGH — from the 2026-06 suite audit (verified: iam.go:606 CreateTags on Resource "*" with no condition).

Where

pkg/aws/iam.go:601-625 (buildInlinePolicy)

Problem

ec2:CreateTags is granted on * with no condition, while destructive TerminateInstances/StopInstances are conditioned on ec2:ResourceTag/spawn:managed=true. A compromised spore can tag ANY instance with spawn:managed=true then terminate it — the condition scoping the destructive perms provides no containment. The owner tag (spawn:iam-user) is likewise forgeable.

Fix

Condition ec2:CreateTags to the instance's own ARN/ID or restrict keys via aws:RequestTag/aws:TagKeys; forbid setting spawn:managed via the instance role; at minimum condition CreateTags on ec2:ResourceTag/spawn:managed=true so a spore can only re-tag already-managed instances.

Priority

P1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions