Analysis · DiggingBeagle record

An agent tool keeps its name while the credential goes somewhere else

ARTEX, Obot, LibreChat and Gemini CLI show different routes by which destination changes can carry earlier authorization into new hosts; FastMCP and Obot OAuth findings add distinct identity and one-time-code problems. The shared diagnostic is what the permission was actually bound to.

Published
Nov 22, 2026

Overview

Suppose a user authorizes an AI agent to call a tool backed by one company's API. A week later, the tool's name and description are unchanged, but its destination URL has been edited. Does the old authorization still apply? In several November disclosures, the effective answer was yes, even though the new endpoint was not the server for which the credential was granted.

The failure is not that OAuth or an API key is inherently insecure. It is that an application's identity of a tool may be a name, a saved action object or a connection label, while the credential's real security property depends on the principal and network destination that receive it. A user-approved tool name is not a permanent grant to any future server associated with that name.

Four distinct ways to move an old credential

The cases have different operator controls and should not be merged into one product defect:

System What the operator originally trusted What could change later
ARTEX legacy SSE client Configured SSE endpoint with supplied authorization headers The server's SSE stream returned a second JSON-RPC URL, which inherited the headers.
Obot remote MCP template Admin-configured server and static authentication header User-influenced URL variables could select another receiving host.
LibreChat shared action Action definition and owner's stored API key An editor of the shared agent could rewrite the OpenAPI servers destination.
Gemini CLI connection MCP connection name with stored OAuth consent The same name could be mapped to a different URL while the cached token remained reusable.

These are not four confirmed credential-theft campaigns. ARTEX described a controlled transport reproduction; Obot and LibreChat disclosed exploitable application flows; the Gemini CLI report contains local request evidence while the fix status still needs release verification. But each describes a concrete way that editable routing data and reusable authorization data could become joined without a fresh decision from the original credential holder.

There are also different moments of trust. In the ARTEX case, the first server can choose the second endpoint during transport negotiation. In LibreChat the editable OpenAPI definition changes before the next tool invocation. In Gemini CLI the cached credential outlives a configuration update. Treating them all as simple redirect handling misses the editor and persistence questions.

Principal binding and code redemption are different bugs

Not every OAuth finding involves a new hostname. Obot's callback binding case lets one user start an authorization process and another user complete it, with the returned token attached to the wrong Obot account. The crucial identity is the local principal to whom a successfully approved remote credential belongs. Requiring PKCE is useful for code interception but is not sufficient to prevent that account association error.

The FastMCP concurrency case concerns a separate invariant: one authorization code should be redeemed once. Its selected tests showed multiple successful redemptions when the consumption check and update were not atomic. The scope of the authorization might be correct and the destination might be unchanged, yet the server still permits an authority token to multiply through concurrent requests.

These distinctions matter when assigning fixes. A URL origin check will not solve wrong-user callback binding; binding the callback to the correct user will not make code redemption atomic; removing a cached OAuth token does not fix an application that still forwards administrator static headers after an editable destination change.

What would a meaningful integration test observe?

A security test needs to record the actual destination and recipient of every secret-bearing request. It should create a safe first connection, persist the credential, change a configuration value using only the permissions a low-privilege actor has and then observe the outbound request. Repeat with HTTP redirects and with an endpoint offered by the server itself during protocol negotiation. The test should fail when the destination differs from the approved origin unless a fresh user or administrator decision expressly permits it.

For OAuth, the test should also bind the initiating local session to the completing principal and verify one-time redemption under concurrent workers. Revocation should be checked against both new actions and previously cached sessions, because removing a connector from a user interface does not necessarily invalidate the underlying bearer or the tool's stored route.

A final caveat is that origin equality alone may not express every permitted enterprise integration. Some providers legitimately use separate authorization and API domains or redirect between documented endpoints. The system can support that architecture with an explicit, versioned destination policy, rather than assuming that any URL returned by an otherwise approved server inherits its credentials.

The larger lesson is specific: tool discovery, user consent, administrator credential custody and execution routing are separate state machines. The model may be allowed to choose which tool to call, but a change to the tool's recipient must still be checked by code that is not itself controlled by the model or an untrusted document.

Research behind this