CEH Web Application and Injection Attacks Practice Question
During a penetration test, the tester finds that the Apache server is configured with directory listing enabled on the /uploads directory. The tester navigates to http://example.com/uploads/ and sees a list of files. Which of the following is the MOST immediate security concern?
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
✓
Sensitive files may be exposed to unauthorized users
Directory listing exposes file names that may reveal sensitive information (e.g., backup files, config files). Attackers can then attempt to access these files directly, potentially leading to data disclosure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Sensitive files may be exposed to unauthorized users
Why this is correct
Directory listing, when enabled on an Apache server, allows an attacker to browse the contents of a directory like a file system. This directly exposes the names and potentially the content of all files within that directory, including configuration files (e.g., .env, web.config), backup files (.bak, .zip), log files, or even source code, which could contain credentials or other sensitive data. Unauthorized access to such files represents a significant information disclosure vulnerability.
- ✗
The server is running an outdated version of Apache
Why it's wrong here
Directory listing is primarily a server configuration setting (e.g., `Options +Indexes` in Apache's httpd.conf or .htaccess) rather than an inherent flaw tied to a specific software version. While some very old server versions might have had it enabled by default, its presence does not inherently indicate an outdated Apache version. A modern, fully patched Apache server can still be misconfigured to allow directory listing, making it a configuration oversight rather than a software version vulnerability.
- ✗
The server is vulnerable to cross-site scripting (XSS) attacks
Why it's wrong here
Directory listing is a server-side information disclosure vulnerability that reveals file and directory structures. Cross-site scripting (XSS) is a client-side injection vulnerability where malicious scripts are injected into trusted websites, typically through input fields or reflected content, to execute in a user's browser. While an XSS vulnerability *could* exist on the same server, directory listing itself does not provide the mechanism for script injection or execution, nor does it directly imply the presence of XSS.
- ✗
An attacker can upload malicious files to the directory
Why it's wrong here
Directory listing provides read-only access to the file names and, upon request, the content of files within the listed directory. It is a passive information disclosure mechanism. Uploading malicious files, or any files, requires specific write permissions on the server's file system, which is a distinct capability not granted by directory listing. An attacker would need to exploit a separate vulnerability, such as an insecure file upload form or a remote code execution flaw, to achieve file upload.
Go deeper
Related to this question
About these practice questions
One of 870 original CEH practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.