# CVE-2026-53708: IBM ContextForge DNS TOCTOU race condition in SSRF validation

Source: https://junglewise.ai/threats/cve-2026-53708-ibm-contextforge-dns-toctou-race-condition-in-ssrf-validation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-14. Updated: 2026-09-24  
License: CC BY 4.0 with a link back

CVE-2026-53708 · Severity: medium · CVSS 6.6 · Published 2026-09-14

The `/admin/gateways/test` endpoint in ContextForge validates gateway URLs by checking the hostname's IP address against a block list (including cloud metadata services). However, the validation and the actual HTTP connection use independent DNS resolutions with no synchronization, allowing an attacker to use DNS rebinding to redirect validated connections to blocked internal addresses. This requires the Admin API to be explicitly enabled and the attacker to hold an authenticated credential with `gateways.read` permission.

Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-53708 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-53708 being exploited in the wild.

**How severe is CVE-2026-53708?** Medium severity, with a CVSS score of 6.6, published 14 September 2026.

**Which products and versions are affected?** mcp-contextforge-gateway (PyPI) < 1.0.3, ECOSYSTEM:introduced=0,fixed=1.0.3.

**Is there a fix for CVE-2026-53708?** Yes. mcp-contextforge-gateway (PyPI): upgrade to 1.0.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-53708 attacked?** It is attacked over the network, in a hosted service.

**Am I affected by CVE-2026-53708?** Check whether you run mcp-contextforge-gateway (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- mcp-contextforge-gateway (PyPI): upgrade to 1.0.3 or later

  ```sh
  pip install "mcp-contextforge-gateway>=1.0.3"
  ```


## Technical details

The vulnerability is a time-of-check-time-of-use (TOCTOU) race condition in DNS resolution. The `validate_gateway_test_url()` function in `mcpgateway/common/validators.py` (lines 1527–1710) resolves a hostname and validates the resulting IP against a block list covering private addresses (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), link-local ranges, and cloud metadata addresses (169.254.169.254). However, only the original hostname string is passed to the HTTP client (`httpx` via `ResilientHttpClient`), which performs an independent DNS resolution at connection time. No mechanism pins the validated IP to the connection. An attacker controlling DNS can exploit this by returning a public IP during validation (which passes the check) and then changing the DNS record to a blocked private IP before the HTTP client connects, achieving DNS rebinding. The vulnerability requires `MCPGATEWAY_ADMIN_API_ENABLED=true` and a valid authentication token with explicit `gateways.read` database-role assignment. The maintainers have documented this limitation in two source-code locations and track it under TODO ICACF-15.

## Affected products

- IBM mcp-contextforge-gateway < 1.0.3

## Identifiers

- CVE-2026-53708
- GHSA-9hgc-g3w5-67cm
- PYSEC-2026-3684

## Timeline

- 2026-06-15: disclosed
- 2026-08-14: advisory

## References

- [https://api.github.com/users/hewei-gikaku](https://api.github.com/users/hewei-gikaku)
- [https://github.com/hewei-gikaku](https://github.com/hewei-gikaku)
- [https://api.github.com/users/hewei-gikaku/gists%7B/gist_id%7D](https://api.github.com/users/hewei-gikaku/gists%7B/gist_id%7D)
- [https://api.github.com/users/hewei-gikaku/repos](https://api.github.com/users/hewei-gikaku/repos)
- [https://avatars.githubusercontent.com/u/277980086?v=4](https://avatars.githubusercontent.com/u/277980086?v=4)
- [https://api.github.com/users/hewei-gikaku/events%7B/privacy%7D](https://api.github.com/users/hewei-gikaku/events%7B/privacy%7D)

## Related threats

- [IBM mcp-contextforge-gateway RestrictedPython sandbox bypass via getattr](https://junglewise.ai/threats/cve-2026-53710-ibm-mcp-contextforge-gateway-restrictedpython-sandbox-bypass-via)
