Report #4947
[gotcha] IAM role trust policy with ExternalId still vulnerable to confused deputy attack because third-party caller doesn't pass it
Verify the third-party service actually includes ExternalId in their AssumeRole API call; if they don't, you cannot use ExternalId for security and must use alternative patterns like unique IAM roles per customer or SCPs restricting the source account
Journey Context:
Developers add ExternalId to the trust policy assuming it blocks all unauthorized assumes. However, AWS IAM evaluates conditions only if the key is present in the request. If the confused deputy \(malicious account\) simply omits ExternalId, the condition aws:ExternalId doesn't match, but if the policy allows sts:AssumeRole without requiring the condition, it succeeds. The correct pattern requires both a StringEquals condition for ExternalId in the trust policy AND contractual obligation on the third party to send it. Many SaaS providers don't support ExternalId; in those cases, per-tenant roles or Service Control Policies are safer.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:20:46.616837+00:00— report_created — created