{"vuln_id":"GHSA-hfxh-rjv7-2369","aliases":[],"description":"Authenticated remote code execution via TailscalePing","published_at":"2023-11-24T17:20:45Z","modified_at":"2023-11-24T17:20:45Z","first_seen_at":"2026-11-22T13:40:14.920003Z","severity":"medium","severity_source":"ghsa","cvss_score":null,"cvss_vector":null,"cwe":["CWE-78"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-hfxh-rjv7-2369"},"matched_alias":null,"items":[{"id":12023,"source":{"id":"gh-uptime-kuma","name":"Uptime Kuma releases + advisories (GitHub louislam/uptime-kuma)"},"title":"GHSA-hfxh-rjv7-2369: Authenticated remote code execution via TailscalePing","summary":"Authenticated remote code execution via TailscalePing\n\n### Summary\r\n\r\nThe `runTailscalePing` method of the `TailscalePing` class injects the `hostname` parameter inside a shell command, leading to a command injection and the possibility to run arbitrary commands on the server.\r\n\r\n### Details\r\n\r\nWhen adding a new monitor on Uptime Kuma, we can select the \"Tailscale Ping\" type. Then we can add a hostname and insert a command injection payload into it. 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.\r\n\r\nhttps://github.com/louislam/uptime-kuma/blob/dc4242019331e65a79ac16deef97510144e01b12/server/monitor-types/tailscale-ping.js#L40-L46\r\n\r\nWe can finally add the new monitor and observe that our command is being executed.\r\n\r\n**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`.\r\n\r\n### PoC\r\n\r\n* Authenticate.\r\n* Create a new monitor.\r\n* Select the TailScale Ping type (if not visible, see the note in the details section).\r\n* Insert the command injection payload inside the `hostname` field. (for example `$(id >&2)`)\r\n* Remove the `pattern` requirement on the field.\r\n* Save and start the monitor.\r\n\r\n![image](https://user-images.githubusercontent.com/112879577/284943751-b63af693-0098-4b8d-a722-2baf8ff1dacf.png)\r\n\r\n### Impact\r\n\r\nAn authenticated user can execute arbitrary command on the server running Uptime Kuma.\r\n\r\n### Remediation\r\n\r\nThere 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.\r\n\r\n**NOTE:** The Tailscale CLI seems to support the `--` sequence. It should be used between the `ping` subcommand and the `hostname` argument to avoid argument injection.\nPatched:  1.23.7","url":"https://github.com/louislam/uptime-kuma/security/advisories/GHSA-hfxh-rjv7-2369","published_at":"2023-11-24T17:20:45Z","updated_at":"2023-11-24T17:20:45Z","fetched_at":"2026-11-22T13:40:14.883739Z","severity":"medium","cvss_score":null,"epss":null,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":"louislam","product":"uptime-kuma","vuln_id":"GHSA-hfxh-rjv7-2369","vuln_ids":["GHSA-HFXH-RJV7-2369"],"tags":["repo-advisory","CWE-78","security","repo:louislam/uptime-kuma"],"cluster_id":11332,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/12023","html":"https://vulnwatch.ve1ve2.com/item/12023"}}]}