openclaw - 💡(How to fix) Fix Security: Tailscale auth trusts HTTP headers for user identity [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#54298Fetched 2026-04-08 01:29:22
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
closed ×1commented ×1labeled ×1locked ×1

Tailscale user identity is read from HTTP headers (tailscale-user-login, tailscale-user-name). While the code validates the source is a loopback address and cross-checks with Tailscale whois, the header-based approach adds trust-chain complexity.

If the loopback check is bypassed (e.g., via SSRF or misconfigured reverse proxy), headers become spoofable.

Root Cause

Tailscale user identity is read from HTTP headers (tailscale-user-login, tailscale-user-name). While the code validates the source is a loopback address and cross-checks with Tailscale whois, the header-based approach adds trust-chain complexity.

If the loopback check is bypassed (e.g., via SSRF or misconfigured reverse proxy), headers become spoofable.

RAW_BUFFERClick to expand / collapse

Summary

Tailscale user identity is read from HTTP headers (tailscale-user-login, tailscale-user-name). While the code validates the source is a loopback address and cross-checks with Tailscale whois, the header-based approach adds trust-chain complexity.

If the loopback check is bypassed (e.g., via SSRF or misconfigured reverse proxy), headers become spoofable.

Impact

Potential identity spoofing if loopback validation is bypassed.

Location

dist/auth-Buq0Niri.js:146-166

Suggested Fix

Prefer Tailscale's Unix socket API for identity verification over HTTP headers.

extent analysis

Fix Plan

To address the issue, we will replace the HTTP header-based approach with Tailscale's Unix socket API for identity verification. Here are the steps:

  • Install the required @tailscale/tsnet package to interact with the Tailscale Unix socket API.
  • Import the package and establish a connection to the Unix socket.
  • Use the whois method to verify the user's identity.

Example Code

const { Socket } = require('@tailscale/tsnet');

// Establish a connection to the Tailscale Unix socket
const socket = new Socket('/var/run/tailscale/tailscaled.sock');

// Verify user identity using the whois method
socket.whois((err, userInfo) => {
  if (err) {
    console.error('Error verifying user identity:', err);
  } else {
    const userLogin = userInfo.login;
    const userName = userInfo.name;
    // Proceed with authenticated user data
  }
});

Verification

To verify the fix, test the following scenarios:

  • Valid user identity verification via the Unix socket API
  • Attempt to spoof user identity via HTTP headers (should fail)
  • Test loopback validation bypass scenarios (e.g., SSRF, misconfigured reverse proxy) to ensure the Unix socket API prevents identity spoofing

Extra Tips

  • Ensure the @tailscale/tsnet package is up-to-date and compatible with your Tailscale version.
  • Handle errors and exceptions properly when interacting with the Unix socket API.
  • Consider implementing additional security measures, such as rate limiting and input validation, to further prevent identity spoofing attempts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING