A Tailscale OAuth client secret lets an automated tool authenticate to the Tailscale API as an OAuth client, with the scopes the client was given. Depending on those scopes, it can manage devices, create auth keys that let new machines join your private network, and change access rules. A tailnet is the private network that connects your servers, laptops and services, so a credential that can add machines to it is a direct route into internal systems. Treat this as critical. Revoke the client first, then check which devices and keys were created.
Check your GitHub account for leaked secrets — free
- Provider
- Tailscale
- Severity
- Critical
- Impact
- Cloud infrastructure access
- Checked live by LeakWatch
- No
What a Tailscale OAuth Client Secret looks like
Tailscale OAuth client secrets begin with tskey-client-, followed by a short identifier, the word CNTRL, and a longer string of letters and digits:
tskey-client-kXXXX-CNTRL-…XXXX Tailscale OAuth client secret (masked)
The tskey- family covers several kinds of Tailscale credential, including API access tokens and auth keys, so the full prefix matters. The tskey-client- form with CNTRL in the middle is the OAuth client secret. A secret of this kind is shown in full only once, when the OAuth client is created, which is why it is often copied straight into a configuration file or a CI variable and then forgotten.
An OAuth client is not the same as a user login. It is a non-human identity that you create for automation, and its access is decided by the scopes you choose at creation. A client with narrow scopes can only do what those scopes allow. A client with broad scopes can administer the tailnet, which is the case to worry about most.
How Tailscale OAuth Client Secrets get leaked
- CI configuration. A pipeline file that contains the secret in plain text, committed to a repository instead of referencing a secret variable.
- Infrastructure code. A Terraform, Ansible or similar file that writes the secret into a configuration value, copied into a public example.
- Container images. A Dockerfile or build step that copies the secret into a layer, which stays in the image even if a later step deletes the file.
- Build logs. A job that prints its environment, or a tool that echoes the command it ran with the secret in it.
- Shared scripts. An automation script with the secret typed in, sent to a colleague or pasted into a support question.
What to do in the first hour
- Revoke the OAuth client. Open the Trust credentials page in the Tailscale admin console and revoke the client that owns the leaked secret. Revocation stops the secret from authenticating at once, so the automation that used it will fail until it has a new client.
- Review devices. Check the list of machines in your tailnet for devices you do not recognize, and for devices that were added recently. Remove any device that you did not authorize.
- Review auth keys. Look at the auth keys that exist, and revoke any you did not create. An auth key can let a new machine join the tailnet, so an unknown key is a serious finding.
- Check the logs. Tailscale’s admin console has logs for administrative activity. Review the changes made with the client in the period since the secret may have been exposed, including changes to access rules, DNS and subnet routes.
- Create a replacement client with the narrowest scopes the automation needs, and store its secret in your secret manager or CI variables.
- Clean the code. Remove the secret from the files and from the history, and check the older commits and images for copies. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same project? Run a free scan.
Revoke it at Tailscale
Tailscale’s documentation places OAuth clients, and the revocation steps for them, on the Trust credentials page of the admin console. Open the Trust credentials page, find the OAuth client by its description, and revoke it. Tailscale’s key and secret management reference describes the same page for revocation. Tailscale’s key and secret management reference is a useful companion to the admin console. The exact wording on the page was not confirmed for this guide, so follow the labels that the admin console shows.
How LeakWatch detects it
The rule is called “Tailscale OAuth Client Secret”. It looks for the exact text tskey-client-k, followed by between four and sixteen letters or digits, the word CNTRL and a dash, then between twenty-eight and forty letters or digits, with word boundaries around the whole value. A value cut short or written in a different form is not reported. The severity is critical, with the impact class for cloud infrastructure. This type is not checked live: LeakWatch does not call Tailscale with the secret it finds.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
What can a leaked OAuth secret do?
That depends on its scopes. A client with device or auth key scopes can change who can join the network, which is the most serious case. Review the scopes on the client before you decide how wide the investigation should be.
Is an auth key the same as an OAuth client secret?
No. An auth key lets a machine join the tailnet, and it is created separately. An OAuth client secret lets an automation call the API. Both are sensitive, and both should be checked after a leak.
Do I need to rebuild my machines?
Not necessarily. Remove any device you did not authorize, and revoke any auth key you did not create. Rebuild only the machines that you cannot confirm are clean.