Skip to content

AAK-MCP-CONTEXTFORGE-CVE-2026-77822-001: IBM ContextForge MCP Gateway: default credentials and JWT key, DNS-rebind and OAuth token-URL SSRF, jq-filter, Admin UI XSS and cross-session leaks (1.0.8 or earlier)

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

What it detects

IBM ContextForge MCP Gateway (mcp-contextforge-gateway on PyPI, and the ghcr.io/ibm/mcp-context-forge image) at or below 1.0.8 carries disclosed defects that one floor remediates. CVE-2026-77822 (HIGH 8.2): the A2A invocation endpoint POST /a2a/{agent_name}/invoke does not pin the DNS-resolved IP at connection time — unlike every other egress path in the gateway — so an authenticated low-privileged user reaches internal addresses by DNS rebinding and receives the full response body. CVE-2026-18905 (HIGH 7.7): the same rebinding class during tool invocation, at or below 1.0.6. CVE-2026-18486 (HIGH 8.8): jq filters are validated improperly, letting a remote authenticated attacker read credentials and escalate, at or below 1.0.7. CVE-2026-18489 (HIGH 7.4): the Translate utility exposes data elements to the wrong session, leaking across sessions, at or below 1.0.8. CVE-2026-78573 (CRITICAL 9.8): 1.0.0 through 1.0.7 ship default credentials, so a remote attacker gains administrative access outright — the floor already in place covers it, and it is recorded here rather than as a second rule because one upgrade remediates all of them. CVE-2026-53709 (CRITICAL 9.8): below 1.0.2 the default JWT_SECRET_KEY is a published string (my-test-key in 0.1.0, a longer variant by 1.0.1), and while REQUIRE_USER_IN_DB is false, its default before 1.0.2, a token whose subject is the platform administrator's email is accepted as that administrator with no database account, so a remote attacker can mint admin tokens. CVE-2026-53711 (MEDIUM, CVSS 4.0 5.1): before 0.3.1 the Admin UI writes a saved Global Prompts template into the page as HTML, a stored XSS against whoever views it. Both are fixed below this floor. CVE-2026-8355 (MEDIUM, CVSS 3.1 6.4 from IBM): through 1.0.5, a user allowed to create gateways registers one with OAuth client credentials and a token_url of their choosing, and the gateway posts its client credentials there and returns up to 256 characters of a reply that is not a token in its 502, so the user reaches internal services and cloud metadata. 1.0.1 began checking token_url, but token requests still followed redirects; 1.0.6 stops following them and checks redirect_uri and jwks_uri too, below this floor as well. Treat < 1.0.9 (and unpinned) as exposed.

How to fix

Upgrade mcp-contextforge-gateway to >= 1.0.9 and pin it, or run the ghcr.io/ibm/mcp-context-forge image at v1.0.9 or later. Change any credential that shipped as a default before doing anything else, JWT_SECRET_KEY included: generate a new one (from 1.0.2, python -m mcpgateway.scripts.init_secrets), because a token signed with the old key stays valid while that key is configured, and in development mode 1.0.2 and later accept a known key with only a warning. Where the gateway makes outbound requests on behalf of a caller, resolve the destination once and connect to the pinned IP rather than re-resolving the hostname after the allow-list check.

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

agent-audit-kit scan . --rules AAK-MCP-CONTEXTFORGE-CVE-2026-77822-001

Limitations

Reads mcp-contextforge-gateway 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 (services/api/pyproject.toml), in .cursor/mcp.json or .vscode/mcp.json, or in a lockfile format the reader does not parse (pdm.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. It also reads ghcr.io/ibm/mcp-context-forge tags below 1.0.9 in compose files, Kubernetes manifests, Helm values, Dockerfiles and MCP configs. latest was the v1.0.11 digest on 2026-10-20, fixed, so an untagged or latest reference, which the README and the chart default to, is not reported.

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-CONTEXTFORGE-CVE-2026-77822-001.md: the page then shows that text, with the registry reference appended under it.