OS Command Injection Affecting uptime-kuma package, versions >=2.0.0-dev.0


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about OS Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-UPTIMEKUMA-6092280
  • published30 Nov 2023
  • disclosed27 Nov 2023
  • creditArnaud PASCAL

Introduced: 27 Nov 2023

CVE NOT AVAILABLE CWE-78  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

Affected versions of this package are vulnerable to OS Command Injection due to improper validation of hostname parameter in the runTailscalePing method. An authenticated user can execute arbitrary command on the server.

Note: When using Uptime Kuma inside a container, the TailScale Ping type is not visible. We can fake this information by intercepting WebSocket messages and set the isContainer option to false.

Workarounds

  1. The front-end application requires that the field follow a specific pattern, this validation only happens on the front-end and can be removed by removing the attribute pattern on the input element.

  2. There are other command execution in the codebase, they use a method spawn from the child_process module which does not interpret the command as a shell command, the same thing should be done here.

  3. The Tailscale CLI seems to support the -- sequence. It should be used between the ping subcommand and the hostname argument to avoid argument injection.

References

CVSS Scores

version 3.1