Skip to main content
All incident reports
Incident report

Tailscale patches SSH forwarding flaws that could give root on other servers

Tailscale has released version 1.104.4 to fix flaws in its built-in SSH server that let a device already permitted to connect reach root-only sockets on the target machine. The flaws were described in a report called Tailworm by Erica Windisch of Cyberdione Labs, published days before the fix, and the two sides disagree over whether the chain is wormable.

· First published

The short version

  • The flaws. Cyberdione Labs reported 11 issues in Tailscale 1.104.2 and the self-hosted headscale 0.29.5 control server, tested in a lab on released software. The most serious is in Tailscale SSH, whose server component runs with root privileges.
  • What an attacker needs. A device must already be permitted by the network's access rules to open an SSH session to the target, with forwarding allowed in that rule. No password or key is required, because Tailscale SSH trusts device identity and policy.
  • The fix. Version 1.104.4 changes forwarding to run as the logged-in user rather than as root and covers four security bulletins. headscale 0.29.5, released on 13 October, does not fix the reported issues and cannot turn forwarding off.
  • The worm dispute. Windisch called the chain wormable, with one compromised device spreading to every device the policy allows in under a second per step. Tailscale rejected the term, describing lateral movement limited to connections the policy already permits.
  • Not seen in the wild. Neither Tailscale nor the report says the flaws have been used in real attacks, and the proof-of-concept code is not public.

Timeline

DateEvent
JuneTailscale fixes a separate flaw in Tailscale SSH's Unix socket forwarding, which let an unprivileged user reach a privileged socket, in version 1.98.9.
13 Octheadscale version 0.29.5 is released; it does not fix the issues later reported.
24 OctTailscale says it received Cyberdione Labs' report on the morning of Saturday 24 October, about two hours before it was published.
25 OctThe Tailworm report by Erica Windisch is published, according to The Hacker News.
27 OctTailscale says it is working on patches and aims to ship a fix by the end of the day.
28 OctTailscale releases version 1.104.4 covering four security bulletins.

How the flaws work

Tailscale SSH does not check a password or key. It identifies the connecting device, and the network's policy file decides whether that device may open a session to a target. The background process that forwards connections inside an approved session runs as root. Cyberdione Labs found that a forwarded connection to a Unix socket — a local endpoint programs on the same machine use to talk to each other — was checked as a path and then handled as root, and that a timing trick could swap the path after the check. Forwarding to the Docker control socket gave a root shell in testing.

The attacker still needs a starting point on one device. The report lists the usual routes: a vulnerable web application, a poisoned software package, phishing, or stolen login details. Tailscale does not create that first foothold, and according to the company a permitted session can reach only the machines the policy already allows.

Other findings and who is exposed

The report covers app connectors, the serve feature, the DERP relay used between devices, and headscale. Its app connector finding is in conn25, an experimental feature. Tailscale says conn25 has not been released and that the connectors customers use today are not affected. Of five serve and funnel findings, Tailscale says it fixed three and considers the other two to work as designed.

Tailscale SSH's server runs only on Linux and the open-source macOS build; the attacker's own device can be any platform. In 1.104.4 Tailscale moved forwarding to the logged-in user and now relies on the operating system's file permissions instead of its own path check. The bulletins carry no CVE identifiers or severity scores and none states the oldest affected version.

Self-hosted deployments are in a worse position. On headscale, forwarding is granted on every accepted session and cannot be switched off in the policy, so Windisch's report says every SSH grant there should be treated as giving root on the target.

Worm claim and disclosure

Windisch measured a single compromised device spreading to every device the access rules allowed, without passwords, stolen keys or user action. Two controls stopped it in her tests: rules written as single device-to-device pairs, and device keys bound to hardware such as a TPM or Secure Enclave. Tailscale said the findings do not describe self-replicating malware. It called the privilege-escalation problems serious: "These are serious security issues, and we're treating them accordingly."

Windisch has described the release as reported but not coordinated, and later said she sent the report and proof-of-concept code to Tailscale's security contact beforehand. Tailscale says engineers were already examining the same code and that it has reproduced the main findings. The sources differ on the publication date: The Hacker News gives 25 October, while Tailscale's account of receiving the report about two hours before publication puts it on 24 October. Other researchers have questioned the worm description.

What ShadowMap sees: Tailscale

  • 20 indicators of compromise in ShadowMap's threat feed are linked to Tailscale.

    TypeIndicator (defanged)
    SHA-2568405d742405d3a6d3bda6bc49630dd5f3604a3d6ae27cbd533e425f8abbaafdc
    SHA-2560faddbe1713455e3fc9777ec45adf07b28e24f4c3ddca37586c2aa6b539898c0
    SHA-256166b6dcdac31f4bf51e4b20a7c3f7d4f7017ca0c30fa123d5591e25c3fa66107
    SHA-2561c88150ec85a07c3db5f18c5eedcb0b653467b897af01d690ed996e5e07ba8e3
    SHA-25621fc0f50d545c0a373380934dc61c423c8a31d8c3e6eae4f8a35149ad9962d88
    SHA-25622a50cea6ad67a7e8582d2cd4cdc3eaaf57c0fbe8cd062a9b15710166e255a86
    SHA-2563e52c310c6556367ff9e18448bc41719e603d1cbbdafdcba736c6565529617b6
    SHA-25673eaba82ef1c502448e533007e92b1afa879b09f85f28b71648668ea62839ff5
    SHA-2567463700ec5768d4af6549028465f978059611555aa8e22e2b7c664b1cdbfa9ae
    SHA-2567586e58a569c2a07d0b3a710616f48833a040bf3fc57628bbdec7fcb462d565a
    SHA-2567e63c6b9ab3b32beffbc1eb23d6ca7cc59616b0722f0dd4f0d893c0a1724f5d7
    SHA-2567f24bc080281d250ec88493e5803e488721a17c9382cd54ba8dfbcb785f23a88
    SHA-25683de8917bf0ac1d670acf27431015215db872b7291979312dd65e30d99806abb
    SHA-25607aa971f0791b06dd442d4c7a49c1d3d27a1cbb16602f731e870b5ef50edf69e
    SHA-256a50f85c71b69563ba42bf04c937e1063244ca4957231d3adac76f1c96ab42d3c
    SHA-256ab56501167fe689fe55f6e6ddc3bb91952299bd5c3ef004b02bf1c3b4061c7cf
    SHA-256c02accc26a389397fb172f83258baa8a974986ffd706ba708a3b0a679f61be56
    SHA-256c6a3a1ea84251aed908702a1f2a565496d583239c5f467f5dcd0cfc5bfb1a6db
    SHA-256cdcbd9c25e06ac6da5497fa19459d0007449ec1a3e6bc591334db6fb3598aecb
    SHA-256e4360c0aa995e6e896b22bb7725a6c9b189be8606e7cbbc8b6e80c606358649d

    As of

What is not known yet

  • Which exact Tailscale and headscale configurations are affected; Tailscale said it was still working out the scope.
  • Whether the flaws have been used against any real network.
  • How old the affected Tailscale releases are, since the bulletins do not say.
  • Whether headscale will gain a way to disable SSH forwarding.
  • Whether any enrolment key captured in an attack has been used to add a device to a network.

What to do

If you run Tailscale SSH

  1. Update to version 1.104.4 or later; where a server cannot be updated yet, set TS_SSH_DISABLE_FORWARDING=1 in the tailscaled service environment and restart the service.
  2. Rewrite access rules as single source-to-destination pairs naming one device and one target, and remove broad grants made by identity or tag.
  3. If a device may be compromised, delete it at the control plane, because reimaging does not revoke a key an attacker may have copied.
  4. Do not rely on SSH check mode for these flaws; it adds a sign-in step at the start of a session but does not stop forwarding inside an approved one.

If you run headscale

  1. Treat every SSH grant as giving root on the target, since forwarding cannot be turned off on headscale 0.29.5.
  2. Tighten SSH access policies so only the specific users and devices that need access can connect.

For everyone else

  1. Turn on node-key expiry and bind device keys to hardware such as a TPM, so a stolen device identity cannot be reused elsewhere.
  2. Remove app connector permissions and any tailscale serve forward pointing at a Unix socket from devices that do not need them.
  3. Enable automatic updates so client fixes are applied without waiting for a maintenance window.

Update log

  • First published.

Sources

New incident reports by email

One email a week with the reports published since the last one.

We email you about this topic only; unsubscribe any time. See our Privacy Policy.

Want us to look at your domain?

Give us one apex domain and we'll send back a written snapshot of what is already visible from outside. No call required.