Описание
uptime-kuma vulnerable to Local File Inclusion (LFI) via Improper URL Handling in Real-Browser monitor
Summary
An Improper URL Handling Vulnerability allows an attacker to access sensitive local files on the server by exploiting the file:/// protocol. This vulnerability is triggered via the "real-browser" request type, which takes a screenshot of the URL provided by the attacker. By supplying local file paths, such as file:///etc/passwd, an attacker can read sensitive data from the server.
Details
The vulnerability arises because the system does not properly validate or sanitize the user input for the URL field. Specifically:
-
The URL input (
<input data-v-5f5c86d7="" id="url" type="url" class="form-control" pattern="https?://.+" required="">) allows users to input arbitrary file paths, including those using thefile:///protocol, without server-side validation. -
The server then uses the user-provided URL to make a request, passing it to a browser instance that performs the "real-browser" request, which takes a screenshot of the content at the given URL. If a local file path is entered (e.g.,
file:///etc/passwd), the browser fetches and captures the file’s content.
Since the user input is not validated, an attacker can manipulate the URL to request local files (e.g., file:///etc/passwd), and the system will capture a screenshot of the file's content, potentially exposing sensitive data.
PoC
- Instructions:
- Enter a local file path as the URL, such as:
view-source:file:///etc/passwd. - The server will process the URL and, in "real-browser" mode, capture a screenshot of the file content.
- Enter a local file path as the URL, such as:
Example PoC:
- Log in to the application with valid credentials:
Impact
This vulnerability is a Local File Inclusion (LFI) issue, which allows an attacker to access and potentially exfiltrate sensitive files from the server. The impact is significant, as attackers can access critical system files or application configuration files, such as:
/etc/passwd: Contains user account information./etc/shadow: Contains password hashes./app/data/kuma.db: Contains the database for the Uptime Kuma monitoring tool./app/data/config.json: Contains the database credentials for Uptime Kuma.
Any authenticated user who can submit a URL in "real-browser" mode is at risk of exposing sensitive data through screenshots of these files.
Пакеты
uptime-kuma
>= 1.23.0, < 1.23.16
1.23.16
uptime-kuma
= 2.0.0-beta.0
2.0.0-beta.1
Связанные уязвимости
Uptime Kuma is an open source, self-hosted monitoring tool. An **Improper URL Handling Vulnerability** allows an attacker to access sensitive local files on the server by exploiting the `file:///` protocol. This vulnerability is triggered via the **"real-browser"** request type, which takes a screenshot of the URL provided by the attacker. By supplying local file paths, such as `file:///etc/passwd`, an attacker can read sensitive data from the server. This vulnerability arises because the system does not properly validate or sanitize the user input for the URL field. Specifically: 1. The URL input (`<input data-v-5f5c86d7="" id="url" type="url" class="form-control" pattern="https?://.+" required="">`) allows users to input arbitrary file paths, including those using the `file:///` protocol, without server-side validation. 2. The server then uses the user-provided URL to make a request, passing it to a browser instance that performs the "real-browser" request, which takes a screenshot o