Courseiva
Web Application and Injection AttackshardMultiple ChoiceObjective-mapped

CEH Web Application and Injection Attacks Practice Question

A web application uses an XML parser to process user-supplied XML documents. An attacker submits the following payload: <?xml version='1.0'?><!DOCTYPE foo [<!ENTITY xxe SYSTEM 'file:///etc/passwd'>]><root>&xxe;</root>. Which vulnerability is being exploited?

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

XML External Entity (XXE) injection

The payload defines an external entity that reads a local file, which is classic XXE (XML External Entity) injection.

Answer analysis

Option-by-option breakdown

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

  • Server-Side Request Forgery (SSRF)

    Why it's wrong here

    Server-Side Request Forgery (SSRF) involves an attacker coercing a server-side application to make HTTP requests to an arbitrary domain of the attacker's choosing. While an XXE vulnerability can sometimes be leveraged to perform SSRF by fetching external URLs, the primary attack described here—reading a local file directly through XML entity expansion—is fundamentally an XML processing vulnerability, not an HTTP request manipulation attack in its core mechanism.

  • XPath injection

    Why it's wrong here

    XPath injection specifically targets applications that construct XPath queries from user-supplied input without proper sanitization. Attackers inject malicious XPath syntax to alter the query logic, potentially bypassing authentication or retrieving unauthorized data from an XML document. This attack vector is distinct from the manipulation of XML entity declarations for file system access, which is the hallmark of an XXE vulnerability.

  • XML External Entity (XXE) injection

    Why this is correct

    XML External Entity (XXE) injection is the correct answer because the scenario describes an attacker leveraging an XML parser to process user-supplied XML containing references to external entities. By defining an external entity that points to a local file path, such as file:///etc/passwd, the vulnerable parser is tricked into reading the content of that file. This content is then embedded within the XML document's response, leading to the unauthorized disclosure of sensitive server-side information.

  • SQL injection

    Why it's wrong here

    SQL injection is a distinct type of vulnerability where an attacker inserts malicious SQL code into input fields to interfere with an application's database queries. This attack exploits improper sanitization of user input before it is incorporated into SQL statements, allowing for data manipulation or extraction. The described scenario, however, involves manipulating an XML parser with an XML payload, making SQL injection entirely irrelevant to the attack vector.

About these practice questions

Courseiva writes every CEH question from scratch — 870 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CEH 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 CEH exam.