Tailscale Fixes SSH Privilege Escalation via Socket Swapping
Original source
Tailscale Patches SSH Flaws That Could Let Hacked Devices Gain Root Access on Other Servers
The Hacker News →Tailscale released version 1.104.4 to patch SSH vulnerabilities allowing attackers with access to a trusted device to reach root-level services on other connected machines. The core flaw exploited the socket forwarding feature, which operates with root privileges. An attacker used a timing-based race condition to swap the forwarded socket path after validation checks passed, bypassing restrictions that limited which sockets forwarding could access. This enabled access to sensitive resources like the Docker daemon socket or Tailscale’s local API. The attack required pre-existing access on a device the network policy already permitted, but no stolen credentials were needed since Tailscale SSH bases access on device identity rather than passwords.
Security researcher Erica Windisch published these findings as the Tailworm report in an uncoordinated disclosure, demonstrating that a single compromised device could spread laterally to every other machine the policy allowed in under a second per hop. Tailscale disputed the “wormable” characterization, contending the findings describe lateral movement constrained by existing policy rather than autonomous self-replicating malware. Four security bulletins address socket-forwarding issues, memory-exhaustion denial-of-service attacks, and problems in Tailscale’s serve feature. The self-hosted headscale control server remains unfixed and carries higher risk because it grants forwarding privileges by default on every SSH session without policy controls to disable it.
The fix changes SSH forwarding to run as the authenticated user rather than root and rely on the operating system’s native file permissions instead of path validation. Users should upgrade immediately to 1.104.4 or disable forwarding temporarily via TS_SSH_DISABLE_FORWARDING=1. Additional measures include tightening SSH access rules to necessary devices only and using SSH check mode for sensitive systems. However, device keys remain valid even after machine reimaging, requiring manual revocation at the control plane if a device has been compromised.
Read the full article
Continue reading at The Hacker News →This is an AI-generated summary. Read the original for the full story.