Skip to content

Server edition: every authenticated user can read shared servers' credentials via listServers/getServer #1161

Closed

Description

@Dumbris

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:

  • env values
  • headers values
  • URL query credentials (?token=…) and userinfo (user:pass@)
  • oauth.client_secret
  • auth_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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/teamskind/bugkind/securitypriority/critical

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions