Junglewise Threat Intelligence

CVE-2023-36821: Uptime Kuma authenticated remote code execution via plugin installation

CVE-2023-36821 · Severity: low · CVSS 3.1 · Published 2024-05-01

Technologies: uptime-kuma (npm). Vendors: npm, Louis Lam.

Executive brief

Uptime Kuma is a self-hosted uptime monitoring application that tracks the availability and performance of websites and services. An authenticated attacker can exploit the plugin installation mechanism to execute arbitrary code on the server by uploading a malicious plugin that leverages npm install scripts, potentially compromising the entire monitoring infrastructure and any systems it has access to.

Technical details

The vulnerability exists in the plugin installation mechanism, which fails to validate plugins against an official list or disable npm scripts during installation. When a plugin is installed, the application calls npm install without the --ignore-scripts flag, allowing execution of preinstall, postinstall, and other npm lifecycle scripts embedded in a malicious plugin's package.json. Attack vector is network-accessible (requires login), with low attack complexity and low privilege requirements—any authenticated user can trigger plugin installation via the API endpoints even when the feature is disabled in the web UI. An attacker gains arbitrary code execution with the privileges of the Uptime Kuma process (often root in containerized deployments). The vulnerability was patched in version 1.22.1.

Affected products

  • Louis Lam Uptime Kuma <=1.22.0

Timeline

  • 2023-07-05: disclosed
  • 2024-05-01: advisory: Published to GitHub Security Advisory database
  • 2023-07-05: patched: Patch released in version 1.22.1

References

Related threats