How to fix: Tailscale auth key in source
tskey-* values allow joining your tailnet. Rotate immediately if exposed.
Why it matters
An exposed Tailscale auth key allows an attacker to join your private tailnet, giving them full network-level access to every machine in your VPN, including databases, internal services, and admin panels that are not otherwise internet-accessible.
tskey-* values allow joining your tailnet. Rotate immediately if exposed.
How to fix it
- 1Revoke the key immediately in the Tailscale admin console under Settings → Keys
- 2Check for any unauthorized devices added to your tailnet
- 3Use ephemeral keys with short TTLs for automated systems; store them in a secrets manager
Code examples
Revoke Tailscale key via API
# List auth keys to find the compromised one
curl -H 'Authorization: Bearer TAILSCALE_API_KEY' \
'https://api.tailscale.com/api/v2/tailnet/YOUR_TAILNET/keys'
# Delete the compromised key (replace KEY_ID)
curl -X DELETE \
-H 'Authorization: Bearer TAILSCALE_API_KEY' \
'https://api.tailscale.com/api/v2/tailnet/YOUR_TAILNET/keys/KEY_ID'Store auth key as a secret (never in source)
# Store in environment / secrets manager
export TS_AUTHKEY="tskey-auth-..."
# Use in Docker or systemd, not in code:
docker run -e TS_AUTHKEY="$TS_AUTHKEY" tailscale/tailscaleReferences
Detected automatically by VulnRadar. The check id is secret-tailscale-key, stable across every scan so you can filter or diff on it.
More secrets checks
Questions
- How severe is Tailscale auth key in source?
- VulnRadar rates this high severity in the secrets category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id secret-tailscale-key, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Tailscale auth key in source map to?
- It maps to CWE-798. In the OWASP Top 10 it falls under A07:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.