Local File Inclusion

Impact: High


Local File Inclusion (LFI) is a vulnerability that allows attackers to include local files, exploiting dynamic file inclusion mechanisms in the target application. This occurs due to the use of user-supplied input without proper validation. The content of the local file is reflected in the response, and if containing code, it might be executed by the application.


To mitigate LFI vulnerabilities, avoid passing user-submitted input to filesystem/framework APIs. If unavoidable, maintain an allow list of files that may be included, using an identifier to access selected files. Reject any request with an invalid identifier to eliminate attack surface.


Last updated on May 13, 2024

This issue is available in SmartScanner Professional

See Pricing