Last weekend, a security researcher published a report titled “Tailworm,” describing potential vulnerabilities in Tailscale SSH and other Tailscale features.
We know that people rely on Tailscale to protect access to important systems, and we understand how concerning it is to learn that some of those protections didn’t work as intended.
Over the past several days, our engineering and security teams have identified issues that require urgent attention, reviewed related code, and developed and tested fixes. Beyond addressing the individual vulnerabilities, we’ve also introduced architectural safeguards designed to protect against broader classes of related issues.
We know that earning your trust means more than simply releasing a patch. You deserve to understand what happened, how it might have affected you, and what we’ve done to make things better. That’s what we want to explain here.
Tailscale supports standard SSH connections over your tailnet, including OpenSSH. Tailscale SSH goes further by providing a built-in SSH server that uses Tailscale identities and access policies to control access.
Administrators can define who can connect to which machines, which local Linux/Unix users they can connect as, and whether connections require an additional authentication check. Tailscale SSH also supports visibility features such as session recording and auditing within the platform.
SSH servers, including OpenSSH and Tailscale SSH, need elevated system privileges to perform certain operations, such as starting sessions as different Unix users. The challenge is ensuring those privileges don’t extend to the connected user’s session, where commands and features such as SSH forwarding must remain within the permissions granted to that user.
The Tailscale SSH vulnerabilities identified primarily concerned how permissions were enforced after a connection had been authorized, rather than the authentication and access policy checks that determine who can connect. Exploitation of these vulnerabilities requires an attacker to already have access to an authorized device in the tailnet.
Under certain conditions, an authenticated SSH session could perform operations beyond the privileges of its configured local user, including through SSH forwarding. These privilege boundaries are an important part of Tailscale SSH’s security model, and in these cases we didn’t enforce them correctly.
It’s important to note that the vulnerabilities don’t allow an unauthenticated attacker to connect to arbitrary Tailscale SSH servers. Exploitation requires an existing foothold on an authorized peer in the tailnet, with SSH access explicitly permitted in the tailnet policy file, along with the conditions necessary to exercise the vulnerable functionality.
The report’s name has also prompted questions about whether these vulnerabilities constitute a computer worm. They don’t describe self-replicating malware spreading automatically between machines. Instead, this would be better described as lateral movement limited to connections allowed by a tailnet policy file.
In addition, the access between machines was still gated by the tailnet policy file. Based on our investigation, an attacker could reach only machines the tailnet policy file already permitted SSH connections to. The vulnerabilities could only be exploited after an attacker had gained the necessary access.
The report also describes five findings in Tailscale Serve and Funnel. Three were bugs, and Tailscale v1.104.4 fixes them. The other two describe behavior that works as designed: bypassing the Funnel attribute check requires local admin access, and TS_SERVE_ALLOW_ALL_INTERFACES is an opt-in setting meant to expose Serve beyond the tailnet.
On Friday, October 23, concerns about Tailscale SSH began circulating on social media. Our engineering and security teams began investigating immediately, with help from external security specialists.
We received the researcher’s report on the morning of Saturday, October 24, and the researcher published it two hours later. By that point, our engineering and security teams were already investigating several related issues and working on fixes.
Once the report was provided, we used it to ground our in-progress investigations, ensure coverage of the public findings, reproduce the relevant issues, and accelerate work on fixes. We also expanded our review of the affected code to make sure we were addressing the underlying problems rather than individual symptoms.
Over the weekend and into Monday, our engineers worked through the fixes and tested the changes, paying particular attention to Unix privileges and SSH forwarding.
On Monday, October 26, we published an investigation update with our initial assessment and recommended precautions.
The resulting fixes are available in Tailscale v1.104.4.
The report also identified a vulnerability in Conn25, the next generation of our app connectors. Conn25 is still in pre-production and hasn’t been released.
We were already aware of this issue, and addressing it is one of the reasons we haven’t released Conn25. Finding and fixing issues like this before a feature reaches users is an important part of our development process. The stable app connectors available today are not affected.
We’re publishing four security bulletins covering the confirmed findings that warrant separate disclosures. Each explains the affected functionality, conditions required for exploitation, impact, and remediation:
The vulnerabilities described above are addressed in Tailscale v1.104.4. If you use Tailscale SSH, we recommend updating to this release or later.
Beyond updating, we also recommend reviewing how SSH access is configured across your tailnet. A few things worth checking:
- Review your Tailscale SSH policies to make sure access is limited to the users and devices that need it.
- Consider SSH check mode for sensitive systems, which requires an additional authentication check before granting access.
We value independent security research and welcome reports that help us improve Tailscale. We’ll apply what we’ve learned from this investigation to our ongoing security work. If you discover a vulnerability, please contact us at security@tailscale.com so we can investigate and work with you to help keep Tailscale’s community safe.
Originally published at Tailscale.