Skip to content
Noroxi
OSV ecosystem advisory

GHSA-pqg7-v6wh-3pfp: TsDProxy: X-Forwarded-For header injection allows IP spoofing in proxied requests to backend services

HighCVSS 8.5 · v3.1—No exploit No fix recorded

Noroxi assessment

Priority: Monitor (action score 34/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Anyone who can reach it over the internet can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
  • No fixed version is recorded, but the references include a patch (commit or PR) link.

Low priority for now. See the fix and affected versions sections below.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: OSV

## Description The HTTP reverse proxy handler in tsdproxy does not strip the X-Forwarded-For (or X-Real-IP) header from incoming requests before calling r.SetXForwarded(). This allows an authenticated Tailscale user to inject arbitrary X-Forwarded-For values that are forwarded verbatim to backend services. ```go // internal/proxymanager/port.go -- Rewrite function Rewrite: func(r *httputil.ProxyRequest) { r.SetURL(pconfig.GetFirstTarget()) r.Out.Host = r.In.Host // Strips tsdproxy identity headers (correct) r.Out.Header.Del(consts.HeaderID) r.Out.Header.Del(consts.HeaderRemoteUser) r.Out.Header.Del(consts.HeaderXForwardedUser) // ... other identity headers deleted ... // X-Forwarded-For is NOT deleted before SetXForwarded! // X-Real-IP is NOT deleted at all! r.SetXForwarded() // APPENDS client IP to attacker-controlled XFF list }, ``` Per Go's httputil.ProxyRequest.SetXForwarded() documentation: > If the inbound request has an existing X-Forwarded-For header, SetXForwarded appends the inbound request's remote address to the list. Result when attacker sends X-Forwarded-For: 127.0.0.1: - Backend receives: X-Forwarded-For: 127.0.0.1, <real-tailscale-client-ip> - If backend reads first element as "original client", attacker appears as 127.0.0.1 X-Real-IP is not handled at all -- if the attacker sets X-Real-IP: 127.0.0.1, it is forwarded to the backend verbatim without any overriding or stripping. Many backend applications trust the first element of X-Forwarded-For (or X-Real-IP) for: - IP-based access control (admin panels restricted to 127.0.0.1) - Rate limiting tied to source IP - Audit logging - Geo-blocking or network-segment restrictions This is particularly impactful in tsdproxy's intended use case where the backend service is only accessible through tsdproxy -- making the proxy's header handling the sole enforcement point. ## CVSS CVSS v3.1: AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N = 7.7 ## Severity High ## Affected Code / Files - `internal/proxymanager/port.go` -- newPortProxy Rewrite closure - Missing: r.Out.Header.Del("X-Forwarded-For") before r.SetXForwarded() - Missing: r.Out.Header.Del("X-Real-IP") unconditional strip ## Steps to Reproduce 1. Deploy tsdproxy with a backend service that restricts /admin to 127.0.0.1 via X-Forwarded-For (e.g., Nginx with real_ip_header X-Forwarded-For and real_ip_recursive on) 2. As an authenticated Tailscale user (non-admin), make a request through the proxy: ```bash curl -H "X-Forwarded-For: 127.0.0.1" \ https://<proxy-hostname>.ts.net/admin ``` 3. Backend receives: X-Forwarded-For: 127.0.0.1, <your-tailscale-ip> 4. Nginx real_ip_recursive resolves left-most non-trusted IP; if tailscale range is the only trusted range, 127.0.0.1 becomes the "real" IP, bypassing admin restriction. For the X-Real-IP vector: ```bash curl -H "X-Real-IP: 127.0.0.1" \ https://<proxy-hostname>.ts.net/admin # Backend receives X-Real-IP: 127.0.0.1 verbatim ``` ## PoC Script (if used) ```bash #!/bin/bash # Demonstrate XFF injection through tsdproxy PROXY_HOST="${1}" # e.g. myapp.my-tailnet.ts.net curl -v \ -H "X-Forwarded-For: 127.0.0.1" \ -H "X-Real-IP: 127.0.0.1" \ "https://${PROXY_HOST}/" # Expected: backend sees XFF: 127.0.0.1, <tailscale-ip> # backend sees X-Real-IP: 127.0.0.1 (unmodified) ``` ## Impact An authenticated Tailscale user who should only have regular user access can: 1. Bypass IP-based admin restrictions on the backend application by spoofing X-Forwarded-For to 127.0.0.1 2. Appear as any arbitrary IP address in audit logs 3. Bypass rate limiting tied to source IP 4. Bypass geo-blocking or network-segment restrictions enforced by the backend This is especially impactful because tsdproxy is designed as the sole access point for backend services that are otherwise network-isolated -- making the proxy the only enforcement boundary. Fix: Add r.Out.Header.Del("X-Forwarded-For") and r.Out.Header.Del("X-Real-IP") in the Rewrite closure before calling r.SetXForwarded(). This ensures only the real Tailscale client IP appears in the XFF chain. ### Credits Reported by Vishal Shukla (@shukla304) using sechub.dev AI Agent ### Support If this disclosure work has been useful, [sponsoring](https://github.com/sponsors/therawdev) helps fund continued open-source security audits -- appreciated either way.

Published
Jul 14, 2026
Updated
Jul 21, 2026
EPSS
—

Report tools

JSON

Action score

34

Monitor

Low priority for now.

CVSS
34 / 40 · 8.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · —

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • No fixed version yet

If any of these changes, we'll tell you in the daily email digest.

Follow GHSA-pqg7-v6wh-3pfp

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
Gogithub.com/almeidapaulopt/tsdproxy

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Gogithub.com/almeidapaulopt/tsdproxyfrom 0—

Same product

Go: all records

Other highest-scoring records for the same primary product.

  • GHSA-g936-7jqj-mwv8TSDProxy: Internal proxy auth token forwarded to backend services enables management API escalation
    36Monitor
  • GO-2026-5969TSDProxy: Internal proxy auth token forwarded to backend services enables management API escalation in github.com/almeidapaulopt/tsdproxy
    0Monitor
  • GO-2026-5982TsDProxy: X-Forwarded-For header injection allows IP spoofing in proxied requests to backend services in github.com/almeidapaulopt/tsdproxy
    0Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

No fix version is recorded for this entry. Check the references for vendor advisories.

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
low · data can be read
Integrity
high · data or configuration can be modified
Availability
none

Impact can extend beyond the vulnerable component (scope changes).

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Changed
Confidentiality impact
Low
Integrity impact
High
Availability impact
None

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:H/A:N

osv

References

All records