Courseiva
Cloud And Hybrid Infrastructure SecurityeasyMultiple ChoiceObjective-mapped

CPENT Cloud And Hybrid Infrastructure Security Practice Question

A penetration tester is auditing an AWS environment and discovers that an IAM role used by an EC2 instance has an overly permissive trust policy allowing any principal in an external AWS account to assume it without specifying an ExternalId. What is the standard security term and remediation for this vulnerability?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Cross-account confused deputy vulnerability; remediate by adding a Condition block requiring an 'sts:ExternalId'.

Allowing external accounts to assume a role without an ExternalId leaves the configuration vulnerable to the 'Confused Deputy' problem. Remediation involves adding a condition using 'sts:ExternalId' to the trust policy.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Access Key exposure; remediate by rotating the static credentials associated with the IAM role.

    Why it's wrong here

    Incorrect. IAM roles use temporary security credentials, not static access keys.

  • Cross-account confused deputy vulnerability; remediate by adding a Condition block requiring an 'sts:ExternalId'.

    Why this is correct

    Correct. The lack of an external ID allows third-party actors to exploit the trust relationship via confused deputy attacks.

  • Resource-based policy escalation; remediate by disabling cross-account access entirely in AWS Organizations.

    Why it's wrong here

    Incorrect. Disabling cross-account access is overly restrictive and does not address the missing ExternalId condition.

  • IAM privilege escalation via PassRole; remediate by removing iam:PassRole permissions from the instance profile.

    Why it's wrong here

    Incorrect. PassRole deals with passing roles to services, not cross-account assumption vulnerabilities.

About these practice questions

This CPENT question is part of Courseiva's 274-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed August 2026 · checked against the official EC-Council exam blueprint

This CPENT practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CPENT exam.