Repository navigation
Description
Summary
In the server edition, listServers and getServer return ServerResponse, which embeds the raw *config.ServerConfig, to every authenticated user — including the admin-configured shared servers. Nothing redacts them, so every user of a multi-user deployment can read the shared servers' credentials.
internal/serveredition/api/user_handlers.go — listServers (~line 208) and getServer (~line 326).
What is exposed
Everything config.ServerConfig carries for a shared server sourced from h.sharedServers:
envvaluesheadersvalues- URL query credentials (
?token=…) and userinfo (user:pass@) oauth.client_secretauth_broker.client_secret(internal/config/auth_broker.go:44)
Why it matters here
The personal edition's equivalent doors are being fixed in #1157 (MCP read surfaces, GET /api/v1/servers, and the /events SSE payload all now go through one redaction rule). This door is the same class of leak with a worse trust model: it is not "anyone who can reach an unauthenticated local port", it is "any authenticated tenant reads the admin's shared-server credentials".
Shared servers are precisely the ones configured once by an admin with real credentials and exposed to many users, so they are the worst case for this leak.
Why it was not fixed in #1157
Deliberately out of scope, and flagging rather than silently expanding that PR:
- different edition and trust model (spec 024 multi-user) than the issue fix(security): stop leaking upstream credentials on MCP read surfaces #1157 addresses;
- it was not among the reviewed findings on that branch;
- the clean fix wants the shared redaction walker that fix(security): stop leaking upstream credentials on MCP read surfaces #1157 is landing in
internal/oauth, so this is better done after it, on top of a stable API.
Suggested fix
Once #1157 lands, route these handlers through oauth.RedactServerSecretFields (or the redacted server view) rather than embedding *config.ServerConfig. Embedding a raw config struct in a response is the recurring root cause across all of these — #1157's own upstream_servers list had two such sites for the isolation config.
A response type that cannot hold a raw *config.ServerConfig at all would prevent the next instance structurally.
Found during the #1157 review rounds.
Activity
fix(security): route the remaining server-payload doors through one r…
fix(security): close the per-user door's remaining shared-server leaks (
fix(security): close the per-user door's remaining shared-server leaks (