Local File Read in Uptime Kuma Real-Browser Monitor via file:// URL Handling
CVE-2024-56331 affects Uptime Kuma, an open-source self-hosted monitoring tool. The vulnerability is an improper URL handling issue in the Real-Browser monitor/request type. User-supplied URL input is not adequately validated server-side, allowing an authenticated user to provide a file:// URI such as file:///etc/passwd despite the client-side pattern intending to restrict input to HTTP(S). The backend passes the attacker-controlled URL to a browser instance used to render the target and capture a screenshot. When a local file URI is supplied, the browser loads local server files and the application captures their contents in the resulting screenshot. This enables local file disclosure from the host running Uptime Kuma, including potentially sensitive operating system and application files such as /etc/passwd, /etc/shadow, kuma.db, or config.json. The issue is fixed in version 1.23.16.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation allows an authenticated attacker to read sensitive local files accessible to the browser/process context on the Uptime Kuma server by causing those files to be rendered and captured in screenshots. Exposed data may include system account information, application configuration, database contents, credentials, secrets, and other sensitive local data. This is an information disclosure issue that can facilitate further compromise depending on the contents of the exposed files.
If you can’t patch tonight, do this now.
If immediate patching is not possible, restrict access to trusted authenticated users only and disable or avoid using the Real-Browser monitor/request type. Implement compensating controls to block submission of file:// and related local-resource URL forms such as view-source:file:// through application-layer validation, reverse-proxy filtering, or custom input sanitization where feasible.
Patch, then assume compromise.
Upgrade Uptime Kuma to version 1.23.16 or later in the 1.x branch, or to 2.0.0-beta.1 or later in the 2.x beta branch, as referenced in the advisory. The fix should include proper server-side validation and sanitization of submitted URLs so that only intended schemes such as http:// and https:// are accepted by the Real-Browser feature.
1 exploit validated by Mallory's analysis.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.