Testing for Local File Inclusion

Details of BNVL-2018-0043

What does the BNVL label mean?

BitNinja Server Security’s BNVL identifiers are intended for use to identify publicly known information security vulnerabilities in publicly released software packages. This project was designed to collect and analyze attack information from the BitNinja network after cluster analysis by the AI-powered Attack Vector Miner. More than 100 vulnerability types have been discovered with this project so far, so we decided to publish this platform to help to keep Linux server owners up-to-date.

Important! All listed BNVL vulnerabilities are protected by BitNinja PRO, so please check your configurations if your infrastructure is affected by any of them.

Syntax for BNVL labels:

BNVL prefix + Year + Arbitrary Digits

Name :
Testing for Local File Inclusion
Related Links: https://www.owasp.org/index.php/Testing_for_Local_File_Inclusion 



The File Inclusion vulnerability allows an attacker to include a file, usually exploiting a “dynamic file inclusion” mechanisms implemented in the target application. The vulnerability occurs due to the use of user-supplied input without proper validation.


This can lead to something as outputting the contents of the file, but depending on the severity, it can also lead to:

Code execution on the web server
Code execution on the client-side such as JavaScript which can lead to other attacks such as cross site scripting (XSS)
Denial of Service (DoS)
Sensitive Information Disclosure

Local File Inclusion (also known as LFI) is the process of including files, that are already locally present on the server, through the exploiting of vulnerable inclusion procedures implemented in the application. This vulnerability occurs, for example, when a page receives, as input, the path to the file that has to be included and this input is not properly sanitized, allowing directory traversal characters (such as dot-dot-slash) to be injected. Although most examples point to vulnerable PHP scripts, we should keep in mind that it is also common in other technologies such as JSP, ASP and others. 

Pattern: ../..