Relay's internal address is disclosed to unauthenticated callers via push.origin and NIP-98 error detail
Summary
The relay's unauthenticated root response includes its configured internal address in a push.origin field. When the relay is fronted by a reverse proxy on a public hostname, that internal address becomes visible to anyone who can reach the public endpoint.
Detail
Relay image ghcr.io/block/buzz:sha-318fbf8, self-hosted via deploy/compose behind Caddy.
GET / requires no authentication and returns relay metadata. In our deployment the response body contains the relay's internal network address (the one it was configured with) in push.origin.
The same address also appears in the NIP-98 error message on a failed authenticated request:
NIP-98 HTTP Auth verification failed: URL mismatch:
event has `https://public.example.com/query`,
expected `http://10.0.0.1:3001/query`
That error is returned to unauthenticated callers as well, since it fires during verification.
Impact
Low, but non-zero. In our case the leaked value is a private-range address that is not routable from the internet, so it is not directly actionable for an attacker. It does disclose internal network topology — that the relay sits behind a proxy, and on what address and port — to anyone who can reach the public endpoint.
For deployments where the origin is on a routable address, this would be more meaningful: it hands out the origin address to unauthenticated callers, which undermines a fronting proxy whose purpose is to keep the origin from being contacted directly.
Suggestion
Either derive push.origin from the configured public base URL rather than the bind address, or make the NIP-98 mismatch message generic for unauthenticated callers (log the detail server-side, return only "URL mismatch" to the client).
Not urgent from our side — filing it because it seems like something you would want to know about rather than something we need fixed.
Claiming this issue.
Repro (code-path verification on current main)
-
NIP-98 client error leakage —
verify_bridge_authmaps auth failures with:api_error(..., &format!("NIP-98: {e}")), which stringifiesAuthError::Nip98Invalidincluding the fullURL mismatch: event has \…`, expected `…`payload frombuzz-auth::nip98. That expected URL is derived from the requestHost, so a reverse-proxied origin (http://10.x.x.x:port/...`) is returned to unauthenticated callers. -
push.origin—push_descriptoradvertises"{scheme}://{tenant_host}"on the unauthenticated NIP-11 document. WhenHostis the internal bind address (common proxy misconfig), that private origin is disclosed without auth.
Related surfaces checked
buzz-mediaalready collapses auth failures to"authentication failed"while logging detail server-side — bridge/git should match that pattern.- Git smart-HTTP NIP-98 verification and any other
format!(…{e})auth mappings will be audited in the same fix.
Implementing: client-safe auth messages + private-origin guard on push.origin.
both fields look like they were already fixed by the tenant-host work, after the sha-318fbf8 image you tested.
on current main push.origin comes from push_descriptor(..., tenant_host) where tenant_host is bind_community(&state.db, raw_host) — the Host header on your GET / (nip11.rs:250). and the nip-98 expected url is format!("{scheme}://{}{path}", tenant.host()) in nip98_expected_url (bridge.rs:195), same for git smart-http in transport.rs:323. only the scheme still comes from config.
so behind caddy you should now see your public hostname in both, not 10.0.0.1:3001. could you confirm on a current image? happy to be wrong.