PT-2026-76568 · Unknown · Mcp-Gateway
CVE-2026-53708
·
Published
2026-08-14
·
Updated
2026-08-19
CVSS v3.1
6.6
Medium
| Vector | AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
mcp-gateway (affected versions not specified)
Description
A Server-Side Request Forgery (SSRF) issue exists due to a Time-of-Check to Time-of-Use (TOCTOU) window in the
/admin/gateways/test endpoint. The system validates submitted URLs by resolving the hostname and blocking private address ranges using the validate gateway test url() function. However, the HTTP client independently re-resolves the DNS at connection time using the original hostname string rather than the validated IP address. An attacker can exploit this via DNS rebinding by returning a public IP during validation and a private IP during the actual connection. This allows access to internal network services and cloud instance metadata, such as the Instance Metadata Service (IMDS) at 169.254.169.254, potentially leading to the theft of IAM role credentials and full cloud account compromise.Recommendations
Pin the connection to the validated IP address instead of passing the hostname to the HTTP client by implementing a custom
httpx transport or resolver that binds the socket to the resolved address and sets the Host header to the original hostname.
Enforce a maximum DNS resolution age and refuse connections if the time between validation and connection exceeds a configurable threshold.Fix
SSRF
Time Of Check To Time Of Use
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Mcp-Gateway