Local File Inclusion (LFI) occurs when a web application dynamically loads or includes files based on user input without proper validation or sanitization.
Attackers exploit LFI to include unintended files from the local filesystem, potentially exposing sensitive data or enabling code execution.
If dynamic inclusion is required:
LFI is simple to exploit and can lead to severe breaches, especially when chained with other vulnerabilities like file upload or RCE. Validate file paths, restrict dynamic includes, and monitor file access closely. Don’t let your app become a file browser for attackers.