---
title: "GHSA-g936-7jqj-mwv8: TSDProxy: Internal proxy auth token forwarded to backend services enables management API escalation"
url: https://erroneo.us/security/ghsa/GHSA-g936-7jqj-mwv8/
description: "GHSA-g936-7jqj-mwv8 (critical, Go): TSDProxy: Internal proxy auth token forwarded to backend services enables management API escalation. Description A…"
type: advisory
section: "Security Digest"
date_published: 2026-07-10
date_modified: 2026-07-10
publisher: erroneo.us
author: erroneo.us Security Desk
ghsa: "GHSA-g936-7jqj-mwv8"
license: All rights reserved. Quote with attribution and a link.
---

# GHSA-g936-7jqj-mwv8: TSDProxy: Internal proxy auth token forwarded to backend services enables management API escalation

## Affected packages

- Go `github.com/almeidapaulopt/tsdproxy` < 1.4.4-0.20260603142855-434819b4421e → fixed: 1.4.4-0.20260603142855-434819b4421e

## Details

Description A vulnerability was discovered in TSDProxy where it forwards its internal per-process authentication token to all proxied backend services. When identityHeaders is enabled (the default), tsdproxy injects x-tsdproxy-auth-token into every upstream HTTP request alongside user identity headers. This token is the same secret used by the management HTTP server to trust forwarded Tailscale identity claims. A backend that receives this token can replay it from localhost to the management port with an arbitrary x-tsdproxy-id value, bypassing Tailscale authentication entirely. The token is forwarded unconditionally: ProviderUserMiddleware always calls WhoisNewContext regardless of whether the user is authenticated. In the ReverseProxy.Rewrite function, WhoisFromContext returns ok=true even for zero-value Whois{} (unauthenticated or Funnel requests). The HeaderAuthToken is set for every request when identityHeaders=true. The attack requires the backend to reach 127.0.0.1:8080. This holds in: (1) non-Docker deployments where tsdproxy and a backend run on the same host, (2) Docker host-network-mode containers, (3) containers sharing tsdproxy's network namespace. Affected files - internal/proxymanager/port.go:123-132 - internal/core/admin.go:160-182 Steps to reproduce 1. Deploy tsdproxy on a host (non-Docker) with a backend at http://localhost:3000. 2. Make a request through the Tailscale proxy. The backend receives x-tsdproxy-auth-token in the request headers. 3. From the host, replay the token to the management API: Fix Remove HeaderAuthToken from the outgoing backend request, and guard identity-header injection on user.ID != "": Impact An attacker with code execution in any backend proxied by tsdproxy (on the same host) gains full management API control: restart or pause all proxied services (DoS), enumerate all proxy configurations and backend network topology, and trigger webhook deliveries (SSRF via configured webhook URLs). Credits Reported by Vishal Shukla (@shukla304 / @therawdev). Sponsorship This audit is from an AI-assisted research agent at sechub.dev. Running it on OSS projects is free for maintainers.

## Sources

- [GitHub Advisory GHSA-g936-7jqj-mwv8](https://github.com/advisories/GHSA-g936-7jqj-mwv8)
- [github.com](https://github.com/almeidapaulopt/tsdproxy/security/advisories/GHSA-g936-7jqj-mwv8)

---
Source page: https://erroneo.us/security/ghsa/GHSA-g936-7jqj-mwv8/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
