# CVE-2026-53708: ContextForge: DNS TOCTOU race condition causes SSRF protection bypass (`/admin/gateways/test`)

> Attacker with specific permissions can bypass SSRF protections via DNS rebinding to access internal services and cloud metadata.

- **Severity:** Medium 6.6 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Sep 2026
- **Updated:** 14 Sep 2026
- **Also known as:** GHSA-9hgc-g3w5-67cm, PYSEC-2026-3684

## What is CVE-2026-53708?

CVE-2026-53708 is a medium-severity server-side request forgery vulnerability in IBM mcp-context-forge, published on 14 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

ContextForge is an AI gateway, registry, and proxy that provides centralized discovery, guardrails, and management for MCP, A2A, and REST or gRPC APIs. Prior to 1.0.3, the /admin/gateways/test call site in mcpgateway/admin.py calls validate_gateway_test_url() in mcpgateway/common/validators.py to resolve and reject private, loopback, link-local, and cloud-metadata addresses, but ResilientHttpClient later resolves the original hostname again without binding the validated address. When MCPGATEWAY_ADMIN_API_ENABLED is enabled, an attacker with a database-backed role containing explicit gateways.read permission can use DNS rebinding to return a public address during validation and a private or metadata address during connection, bypassing ssrf_blocked_networks and ssrf_dns_fail_closed because those controls apply only to the validation-time result. The endpoint's allow_admin_bypass=False setting means a bootstrap-only virtual platform-admin identity without a database role is not sufficient. Successful exploitation can reach internal services and cloud metadata, expose cloud credentials, access internal APIs, or probe internal network ports. This issue is fixed in version 1.0.3.

Weakness: CWE-918 (Server-Side Request Forgery), CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition), CWE-350 (Reliance on Reverse DNS Resolution for a Security-Critical Action)

## Which versions are affected by CVE-2026-53708?

3 open source packages ship an affected version, including mcp-contextforge-gateway.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mcp-contextforge-gateway` | PyPI | All versions | 1.0.3 |
| `mcp-contextforge-gateway` | PyPI | All versions | 1.0.3 |
| `mcp-contextforge-gateway` | PyPI | All versions | 1.0.3 |

## How do I fix CVE-2026-53708?

Upgrade mcp-contextforge-gateway to 1.0.3 or later.

## Is CVE-2026-53708 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-53708 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-53708 and fix it if it is affected.

What it is: CVE-2026-53708 is a medium-severity server-side request forgery vulnerability in IBM mcp-context-forge, published on 14 Sep 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-53708 exists.

Affected packages and fixed versions:
- mcp-contextforge-gateway (PyPI): affected all versions; fixed in 1.0.3
- mcp-contextforge-gateway (PyPI): affected all versions; fixed in 1.0.3
- mcp-contextforge-gateway (PyPI): affected all versions; fixed in 1.0.3

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-53708/ (Markdown: https://insights.sbomify.com/CVE-2026-53708/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-53708
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-53708
- OSV: https://osv.dev/vulnerability/CVE-2026-53708

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-53708/
Summaries are generated and may contain mistakes; the official description above is the record.
