GHSA-g936-7jqj-mwv8: TSDProxy Internal Proxy Auth Token Forwarded Vulnerability
CRITICALGHSA-g936-7jqj-mwv8 is a CRITICAL (CVSS 9.0) internal proxy auth token forwarded vulnerability (CWE-287: Improper Authentication) affecting TSDProxy libraries in the Go ecosystem. The issue involves internal proxy auth token forwarded to backend services enables management api escalation. Remediation is available by upgrading affected packages to version 1.4.4-0.20260603142855-434819b4421e.
GHSA-g936-7jqj-mwv8 at a Glance
Security Impact
CVSS: 9.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix GHSA-g936-7jqj-mwv8
To remediate this vulnerability, upgrade all affected TSDProxy dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/almeidapaulopt/tsdproxy to 1.4.4-0.20260603142855-434819b4421e
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/almeidapaulopt/tsdproxy
How to Check if You Are Affected
To determine whether your application is affected by GHSA-g936-7jqj-mwv8, inspect your project dependencies for TSDProxy:
inspect dependencies for github.com/almeidapaulopt/tsdproxy
Analyze the terminal output to locate any version of TSDProxy in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.4-0.20260603142855-434819b4421e), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In TSDProxy, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-g936-7jqj-mwv8 Affected TSDProxy Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/almeidapaulopt/tsdproxy
|
Go |
< 1.4.4-0.20260603142855-434819b4421e
|
1.4.4-0.20260603142855-434819b4421e
|
References
Frequently Asked Questions
What is GHSA-g936-7jqj-mwv8?
Which TSDProxy versions are affected?
What version fixes GHSA-g936-7jqj-mwv8?
Is github.com/almeidapaulopt/tsdproxy affected?
What is the CVSS score of GHSA-g936-7jqj-mwv8?
What CWE is associated with GHSA-g936-7jqj-mwv8?
How can I check Go dependencies for GHSA-g936-7jqj-mwv8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g936-7jqj-mwv8",
"modified" : "2026-07-10T21:43:13Z",
"published" : "2026-07-10T21:43:13Z",
"aliases" : [ ],
"summary" : "TSDProxy: Internal proxy auth token forwarded to backend services enables management API escalation",
"details" : "## Description\n\nA 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.\n\nThe 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`.\n\nThe 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.\n\n## Affected files\n\n- `internal/proxymanager/port.go:123-132`\n- `internal/core/admin.go:160-182`\n\n```go\n// port.go: auth token forwarded regardless of user authentication state\nif identityHeaders {\n if user, ok := model.WhoisFromContext(r.In.Context()); ok {\n // ok=true even for empty Whois{} stored by ProviderUserMiddleware\n r.Out.Header.Set(consts.HeaderAuthToken, core.ProxyAuthToken()) // token sent to backend\n }\n}\n\n// admin.go: management port trusts x-tsdproxy-id from localhost when token is valid\nfunc ResolveWhois(r *http.Request) model.Whois {\n if IsLocalhost(r.RemoteAddr) {\n return model.Whois{\n ID: r.Header.Get(consts.HeaderID), // attacker-controlled after stealing token\n }\n }\n return model.Whois{}\n}\n```\n\n## Steps to reproduce\n\n1. Deploy tsdproxy on a host (non-Docker) with a backend at `http://localhost:3000`.\n2. Make a request through the Tailscale proxy. The backend receives `x-tsdproxy-auth-token` in the request headers.\n3. From the host, replay the token to the management API:\n\n```bash\n# Capture token from backend headers (e.g., via a header-reflection endpoint)\nTOKEN=$(curl -s http://localhost:3000/debug/headers | python3 -c \"import sys,json; d=json.load(sys.stdin); print(d['headers'].get('X-Tsdproxy-Auth-Token',''))\")\n\n# Replay from localhost to gain admin access\ncurl -H \"x-tsdproxy-auth-token: $TOKEN\" \\\n -H \"x-tsdproxy-id: attacker\" \\\n http://127.0.0.1:8080/api/v1/proxies\n# Returns full proxy list with admin access\n```\n\n## Fix\n\nRemove `HeaderAuthToken` from the outgoing backend request, and guard identity-header injection on `user.ID != \"\"`:\n\n```go\n// port.go: only inject headers for actually authenticated users\nif identityHeaders {\n if user, ok := model.WhoisFromContext(r.In.Context()); ok && user.ID != \"\" {\n r.Out.Header.Set(consts.HeaderID, user.ID)\n // HeaderAuthToken should NOT be forwarded to backends\n }\n}\n```\n\n## Impact\n\nAn 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).\n\n## Credits\n\nReported by Vishal Shukla (@shukla304 / @therawdev).\n\n## Sponsorship\n\nThis audit is from an AI-assisted research agent at [sechub.dev](https://sechub.dev). Running it on OSS projects is free for maintainers.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/almeidapaulopt/tsdproxy"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.4-0.20260603142855-434819b4421e"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/almeidapaulopt/tsdproxy/security/advisories/GHSA-g936-7jqj-mwv8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/almeidapaulopt/tsdproxy"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-287" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-10T21:43:13Z",
"nvd_published_at" : null
}
}