hardMultiple Choice
CCSP Practice Question: An attacker publishes a malicious package to a…
An attacker publishes a malicious package to a public registry using the same name as an internal package used by a cloud application. This is known as:
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
✓
Dependency confusion attack
Dependency confusion attacks exploit package managers that prioritize public registries over private ones, allowing malicious packages to be installed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cross-site scripting (XSS)
Why it's wrong here
XSS is a web vulnerability, not a supply chain attack.
- ✗
Man-in-the-middle attack
Why it's wrong here
A man-in-the-middle attack intercepts communications between two parties; it does not involve publishing a lookalike package to a public registry. It is tempting because both are attacker-in-the-middle techniques, but MITM would be correct if traffic were being relayed or altered in transit.
- ✓
Dependency confusion attack
Why this is correct
Dependency confusion exploits package managers that check public registries before private ones, letting an attacker register a higher-versioned public package matching an internal name. The build resolves the malicious public package, executing attacker code within the pipeline.
- ✗
Supply chain poisoning
Why it's wrong here
Supply chain poisoning covers compromise of build pipelines, dependencies or distribution channels, but not the specific name-confusion technique described. It is tempting because the scenario is a supply chain attack, yet the precise mechanism of publishing a public package matching an internal name is dependency confusion.
Go deeper
Related to this question
About these practice questions
Courseiva writes every CCSP question from scratch — 934 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CCSP practice question is part of Courseiva's free ISC2 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 CCSP exam.