luci-app-tailscale-community: fix shell code injections through login params
authorJo-Philipp Wich <redacted>
Thu, 11 Jun 2026 08:10:34 +0000 (10:10 +0200)
committerJo-Philipp Wich <redacted>
Thu, 11 Jun 2026 08:13:41 +0000 (10:13 +0200)
commit507ab5e45c304543d4111af9a331db0f03be6bcb
treef3811eb4440a898ee9a3d0280af1a3d4d4b50b93
parent46cd82328dfb7fbb15961c63f9e674a41cef2500
luci-app-tailscale-community: fix shell code injections through login params

While individual user supplied credential values were properly shell quoted,
the entire constructed command line got passed to `/bin/sh -c "..."`, enabling
interpolation of nested `$(...)` and backtick expressions.

Solve the issue by passing the final command string as properly escaped,
single quoted expression to the shell.

A more thorough fix would be using `system([...])` with an array vector
but since I neither can test, nor understand the reason for the shell
`&` background operation, I cannot easily fix this.

See https://github.com/openwrt/luci/security/advisories/GHSA-xwc5-mx58-rh35.

Signed-off-by: Jo-Philipp Wich <redacted>
applications/luci-app-tailscale-community/root/usr/share/rpcd/ucode/tailscale.uc
git clone https://git.99rst.org/PROJECT