Advantech R-SeeNet options.php local file inclusion (LFI) vulnerability
The options.php script in Advantech R-SeeNet takes a user-supplied parameter and uses it in a PHP include statement without sanitisation, allowing an attacker to include local files. An attacker could read sensitive files such as the configuration file containing database credentials.
A local file inclusion (LFI) vulnerability exists in the options.php script functionality of Advantech R-SeeNet v 2.4.12 (20.10.2020). A specially crafted HTTP request can lead to arbitrary PHP code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The application passes the user-controlled sub_opt parameter directly into a PHP include statement without any validation or sanitisation.
Impact
An attacker could read sensitive local files such as the configuration file containing database credentials, and the report states this can lead to arbitrary PHP code execution.
What the attacker needed
A logged-in account, even guest
How it was found
- Log in to the R-SeeNet web application, even as a guest user.
- Send an HTTP request to index.php with page=options and a sub_opt value that uses a PHP stream wrapper to read a local file.
- Observe the base64-encoded contents of the configuration file in the response.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A local file inclusion bug lets an attacker trick a web server into loading a file from its own disk that it should not show. Here, the page takes a value from the URL and uses it to decide which file to load, without checking it. By using a special PHP file wrapper, the attacker can read the contents of a configuration file that holds database usernames and passwords.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.