The vulnerability is a Server-Side Request Forgery (SSRF) in the n8n-mcp library, specifically within the SSRFProtection.validateUrlSync function. The root cause was the lack of validation for IPv4-mapped IPv6 addresses. An attacker could provide a URL like http://[::ffff:169.254.169.254] to bypass the existing SSRF filters, which only checked for standard IPv4 private ranges and localhost addresses. This allowed the attacker to make the server issue requests to internal network resources, including cloud metadata services (like AWS IMDS), and retrieve the responses.
The patch addresses this by introducing a new helper function, isPrivateOrMappedIpv6, which specifically checks for a wide range of private, reserved, and mapped IPv6 address patterns that could be used for malicious purposes. This new, stricter validation is then applied to both the synchronous validateUrlSync function (the primary source of the vulnerability) and the asynchronous validateWebhookUrl function, replacing its previous, less complete IPv6 checks. The key vulnerable function is validateUrlSync because it was the entry point for the SSRF in the SDK embedder path.