Skip to content

AAK-MCP-MCPHUB-CVE-2026-79748-001: @samanhappy/mcphub below 1.1.8 (MCP gateway authorization, SSRF and credential-leak defects)

Severity
CRITICAL
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
McpHubGatewayAuthorizationBypass

What it detects

MCPHub is a self-hosted gateway that fronts many MCP servers behind one endpoint, so a defect in its authorization layer is a defect in every server behind it. Eight advisories landed against it in one batch (CVE-2026-79743 through CVE-2026-79750) and they are carried by one pin because they share a package and the highest fix version covers all of them. The batch is mostly missing authorization on mutating routes: PUT /api/system-config performs no authorization check at all (< 1.0.29); the prompt and resource controllers do no role checking on their mutating POST/PUT routes (< 1.0.32); a bearer key scoped to servers is accepted against a group route it should not reach (< 1.0.31); and non-admin server ownership scoping is enforced on list views and config edits but not everywhere (< 1.0.30). The remaining three are execution and egress: the POST /api/servers and PUT /api/servers/:name endpoints create MCP server entries whose command is executed (< 0.12.15, CVSS 9.9), the MCPB file-upload handler trusts the name field of a manifest.json read out of an uploaded ZIP (< 0.12.13), and the SSRF guard in src/utils/ssrf.ts uses a custom isBlockedIpv6 that does not cover the address forms it needs to, so an authenticated non-admin registers a server pointing at an internal URL and reads the response back through the hub (< 1.0.32). A ninth, CVE-2026-120323 (VulDB, 2 Nov 2026), leaks the credentials a server entry's passthroughHeaders forward: its record lists every 1.0.x through 1.0.45 and 1.1.x through 1.1.7 as affected and names 1.1.8 as the fix, with no 1.0.x fix, so the pin's floor is 1.1.8. A project pinning @samanhappy/mcphub below 1.1.8, or leaving it unpinned, is exposed to at least one of these. Note that PyPI mcphub is an unrelated project by a different author on a 0.1.x line; this rule matches the scoped npm name only and will not fire on it.

How to fix

Upgrade @samanhappy/mcphub to >= 1.1.8 and pin it — that floor clears all nine. Until you are past it, treat every authenticated MCPHub user as able to reach the mutating admin routes: put the hub behind an authenticating proxy, restrict who may create or update server entries at all (that route reaches command execution), and place the hub on a network segment with no route to internal services so the SSRF guard is not the only control.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-MCPHUB-CVE-2026-79748-001

Limitations

Reads @samanhappy/mcphub in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, package.json, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock, uv.lock, package-lock.json, pnpm-lock.yaml and yarn.lock lockfiles, taking the lowest version a range allows and reporting a reference that states no version. The dependency is not read when it is declared in a sub-directory manifest (packages/app/package.json), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (a Yarn 2+ yarn.lock). A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-MCPHUB-CVE-2026-79748-001.md: the page then shows that text, with the registry reference appended under it.