Exposure of Information Through Directory Listing

Draft Variant
Structure: Simple
Description

The product inappropriately exposes a directory listing with an index of all the resources located inside of the directory.

The product inappropriately exposes a directory listing with an index of all the resources located inside of the directory.
Common Consequences 1
Scope: Confidentiality

Impact: Read Files or Directories

Exposing the contents of a directory can lead to an attacker gaining access to source code or providing useful information for the attacker to devise exploits, such as creation times of files or any information that may be encoded in file names. The directory listing may also compromise private or confidential data.

Detection Methods 1
Automated Static AnalysisHigh
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Potential Mitigations 1
Phase: Architecture and DesignSystem Configuration
Recommendations include restricting access to important directories or files by adopting a need to know requirement for both the document and server root, and turning off features such as Automatic Directory Listings that could expose private files and provide information that could be utilized by an attacker when formulating or conducting an attack.
References 2
Directory Indexing
Web Application Security Consortium
20-05-2009
ID: REF-1458
Directory indexing attacks
IBM
08-03-2021
ID: REF-1459
Modes of Introduction
Implementation
Operation
Taxonomy Mapping
  • OWASP Top Ten 2004
  • WASC