This vulnerability occurs when an application unintentionally stores confidential data—like passwords, API keys, or personal user details—in a location that is publicly accessible or readable by unauthorized users. Even if the file itself is intended to be available, the sensitive information within it should not be.
This flaw typically happens due to misconfigured file permissions, insecure default settings, or development practices that accidentally write secrets into log files, debug dumps, configuration files, or temporary directories. For example, an application might log full HTTP requests containing session tokens, or a deployment script could leave a backup file with database credentials in a web-accessible folder. Attackers can easily discover and exploit these exposed files using automated scanners or by guessing common file names. To prevent this, developers should implement strict access controls, ensuring sensitive files are stored outside web roots with proper permissions. Application code must avoid logging secrets, and automated processes should scrub sensitive data from any output. Regular security scans of publicly accessible directories are essential to detect accidental information leaks before they can be exploited.
Impact: Read Files or Directories
java