Skip to content
Path traversal Advisory Intermediate CVE-2021-21804

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.

Member Follow

Originally disclosed on Cisco Talos

High 8.1 View original

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.

Member, on Cisco Talos

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

  1. Log in to the R-SeeNet web application, even as a guest user.
  2. 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.
  3. 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.

More by Member

View all

4 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.