News · DiggingBeagle record

FastMCP closes an OAuth code-redemption race that minted multiple tokens

A FastMCP OAuthProxy race allowed one authorization code to be consumed more than once during concurrent requests in tested storage backends. Version 4.2.4 changes redemption atomicity; this is not evidence of a real-world theft campaign.

Published
Nov 22, 2026

The report

An OAuth authorization code is normally a one-time capability. In the FastMCP OAuthProxy versions covered by an advisory, checking the code and marking it consumed were not atomic across concurrent requests, so multiple exchanges could accept the same nominally single-use authorization. The issue concerns the authorization server's state transition, not an LLM choosing to misuse the token.

Researchers tested both disk-backed and Redis-backed storage under concurrent redemption. The FastMCP advisory reports duplicate successful token issuance in 18 to 20 of 20 attempts in selected configurations. That is a test-specific result, not a measured exploitation rate among installations. The affected range is 2.13.0 through 4.2.3; version 4.2.4 is identified as fixed.

Why PKCE is not the whole repair

PKCE binds the authorization-code exchange to a verifier held by the initiating client, helping prevent interception of a code being redeemed by a different client. It does not replace server-side single-consumption semantics for a correctly authorized client, nor does it make a non-atomic storage operation safe when requests race. Where a legitimate client or an attacker with access to the necessary exchange values can submit concurrent requests, both authorization and durable state need to agree that the code has been used exactly once.

This failure should not be conflated with Obot's cross-account callback binding issue. One permits more than one redemption of a single capability; the other can bind a completed sign-in to the wrong local principal. Both matter to agents connecting to external services, but they require different server invariants and different regression tests.

The advisory does not demonstrate unauthorized access to a named tenant or token theft in the wild. A useful verification would exercise multiple concurrent workers and process restarts against every supported token store, ensuring that durable redemption remains single-use even when a request fails between database update and HTTP response.

Research behind this