This vulnerability occurs when sensitive data like passwords or system details is placed inside a publicly accessible include file. Attackers can directly request these files to steal credentials and compromise the application.
Include files (like .inc, .config, or library files) are often used to store common code or configuration settings. When these files contain hard-coded secrets such as database passwords, API keys, or administrative credentials, and are left in a web-accessible directory, they become a prime target. Attackers can simply browse to the file's URL to download its full source code, bypassing the main application's security controls entirely. To prevent this, never store sensitive information within web-accessible include files. Instead, move configuration containing secrets outside the web root or into environment variables and protected configuration files. Additionally, configure your web server to deny requests to files with common include extensions, and ensure your deployment process cleans directories of development or backup files that might inadvertently expose data.
Impact: Read Application Data
phpphp