Skip to main content
Menu
Advisories

Agent Router promptSelector exclusion bypassed by direct prompts/get

GHSA-PH8C-HP5F-JR6WPublished Updated GitHub

Description

The promptSelector exclusion filters a prompt from prompts/list but is not checked for direct prompts/get requests. A client with access to the route and an established backend session can request an excluded prompt name if it is known or guessed; if the backend serves sensitive prompt content, the proxy can return it despite the exclusion. Confirmed on Agent Router v1.2.0. Suggested severity: Low, conditional on sensitive prompts being served.

Details

The API documents that prompts excluded by promptSelector will not be available. The prompts/list handler applies the configured selector, but handlePromptGetRequest resolves the composite prompt name to a backend and forwards it without checking that backend's selector. The proxy then relays the backend response. By contrast, tools/call checks toolSelector before forwarding, and the API describes promptSelector as analogous to toolSelector.

A client needs access to the route, an established session with the backend, and a known or guessed excluded prompt name. The impact depends on whether the backend actually serves sensitive prompt content. This is not an authentication bypass.

Source: api/v1beta1/mcp_route.go:203,307-337; internal/mcpproxy/handlers.go:514-545; internal/mcpproxy/legacy.go:680-684,1196-1225,1228-1250.

Proof of concept

  1. On v1.2.0, configure an MCP route with a backend named demo, default prefixed prompt names, and promptSelector.exclude containing private_prompt. Have the backend list and serve private_prompt.
  2. Establish a normal MCP session through the route.
  3. Call prompts/list and verify demo__private_prompt is absent.
  4. In the same session, call prompts/get with name demo__private_prompt. The proxy resolves it to backend demo and forwards prompts/get for private_prompt despite the exclusion.

A local handler test with a loopback fake backend confirmed the excluded prompt was omitted from the list and the direct get reached the backend. The test did not run Envoy, Kubernetes, or an external service. The completion/complete ref/prompt path uses the same unchecked resolver by source inspection, but was not tested.

Impact

A client with ordinary access to the route can retrieve a prompt the operator configured as excluded, if the backend serves sensitive content under a known or guessable name. This is a conditional confidentiality issue only; it does not bypass route authentication or affect prompts that the backend does not serve.

Affected versions

References

GitHub · theagentrouter/agent-router