n8n-mcp IPv4-mapped IPv6 SSRF in SDK URL validation (GHSA-56c3-vfp2-5qqj / CVE-2026-42449)¶
Signal: GitHub Security Advisories published 2026-04-30. n8n-mcp fixed a non-blind SSRF in SDK embedder paths where IPv4-mapped IPv6 literals bypassed synchronous URL validation.
What it is¶
SSRFProtection.validateUrlSync() did not apply IPv6 range checks. SDK embedders that accepted user-controlled n8nApiUrl values could be made to request hosts such as http://[::ffff:169.254.169.254], bypassing checks for localhost, RFC1918 networks, and cloud metadata endpoints. Response bodies are returned to the caller, and the x-n8n-api-key header can be forwarded to the attacker-selected endpoint.
Affected package: npm n8n-mcp versions 2.47.4 through 2.47.13 when using N8NDocumentationMCPServer / N8NMCPEngine with user-supplied instance context. Fixed version: 2.47.14.
Reference: https://github.com/advisories/GHSA-56c3-vfp2-5qqj
Triage¶
- Find services embedding
n8n-mcpas an SDK rather than only running the first-party HTTP server. - Check whether
n8nApiUrlor instance context can come from tenants, users, uploaded configs, or untrusted automation. - Review egress logs for bracketed IPv6 literals, IPv4-mapped IPv6, metadata IPs, localhost, and private-network destinations from the n8n-mcp process.
Mitigation¶
- Upgrade to
n8n-mcp >= 2.47.14. - Reject IP literals, bracketed IPv6, and private/link-local/metadata ranges before passing URLs into the SDK.
- Enforce process/network egress deny rules for metadata, localhost, RFC1918, and internal control-plane ranges.
- Do not forward privileged API keys to user-selected base URLs.
Detection ideas¶
- Search logs and traces for
::ffff:, bracketed IPv6 hosts,169.254.169.254,localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12, and192.168.0.0/16asn8nApiUrltargets. - Hunt for unexpected
x-n8n-api-keytraffic to non-n8n hosts.
Durable lesson¶
URL validation is not complete until all equivalent address forms collapse to the same policy decision. IPv4-mapped IPv6, DNS rebinding, redirects, and normalized hostnames need the same egress policy as plain IPv4 literals.
October 9 follow-up: Pydantic AI metadata-blocklist bypass via IPv6 zone identifiers, %25-encoded scope IDs survive into the connect target (CVE-2026-107289 / GHSA-vmxc-h2x2-jmf3)¶
Third-generation fix-drift on this exact invariant. Pydantic AI's cloud-metadata blocklist (itself already two generations of fixes deep: CVE-2026-25580 → CVE-2026-46678 → CVE-2026-48782) is bypassed by appending an IPv6 zone identifier to a metadata address: fd00:ec2::254%251 (AWS IPv6 metadata endpoint with %251 = URL-encoded zone %1). The validator parses the zone and treats the string as a different/unmatchable host, while the host stack ignores the zone on a non-link-local destination and delivers to the metadata endpoint anyway, exposing cloud IAM short-term credentials through FileUrl(force_download='allow-local') / web_fetch_tool(allow_local_urls=True).
Operator battery additions for every URL-allowlist/metadata-blocklist engagement (add to the canonicalization sweep this page already prescribes):
- Zone-identifier shapes on every blocklisted IPv6 literal:
fe80::1%251,%25eth0,%25lo, double-encoded%25251, validators that callnetip.ParseAddr-family parsers often reject or normalize-away the zone while the socket layer silently drops it and connects. - The general rule stays the same and now has a fourth proof point: any token the parser understands but the connect path discards creates a validator-vs-destination split. Zone IDs are the newest member of the family next to IPv4-mapped IPv6, leading-zero octets, and DNS rebinding. Grep for URL/network validators that call a parse-and-stringify routine (
Addr.String()-style), the stringify is where the discarded token disappears from the comparison but not the connection. - Fix-generation counting is recon: three prior CVEs on the same guard means the guard is a denylist over address spellings, not a resolve-then-connect design, expect more spellings (this is now confirmed a fourth time) and test new spellings against it first.
October 10 follow-up: Kortix Suna connector URLs, private-IP guard bypassed with 6to4/Teredo spellings that embed the private IPv4 destination (CVE-2026-108115 / GHSA-f37m-qrrx-ww7w, low as scored, fixed 0.13.52)¶
Fourth-something spelling on this page's invariant, now on the AI-agent-platform side: Kortix Suna project holders with project.connector.write set connector base_url / OpenAPI / Postman / MCP URLs to IPv6 6to4 (2002:) or Teredo addresses embedding a private IPv4 destination, the isPrivateIp guard checks the IPv6 literal's own prefix (global 6to4/Teredo space, not RFC1918), passes it, and the dual-stack/NAT64 stack routes the embedded IPv4 to internal services and cloud metadata, with responses readable through the connector. Same family as the May 29 Gotenberg deny-list leg (6to4/NAT64/fec0::/10 spellings) and the Oct 9 Pydantic AI zone-ID leg on this page.
Operator additions: (1) the connector-config angle, on AI/automation platforms, every stored outbound-fetch config (connectors, webhooks, MCP servers, OpenAPI imports, Postman collections) is a URL validator you must sweep, and these often ship a different, weaker guard than the platform's main fetch path; test the battery against each config field separately. (2) The spellings to append to this page's canonicalization battery: 2002:7f00:1::-style 6to4 (embed 127.0.0.1 as hex groups), 2001:db8::-wrapped Teredo with XOR-obfuscated client/server IPv4, 64:ff9b::<ipv4> and 64:ff9b:1::<ipv4> NAT64, and check whether the guard's IP class check runs on the literal string, the parsed IPv6Address, or the post-resolution route; only the last is correct. (3) CVSS 5.3/low hides that cloud-metadata reach + response read from a mid-privilege role is a standard lateral step; report on reachability and response-read proof, not on the vendor's score.
October 22 follow-up: Roundcube is_local_url(), a blocklist SSRF guard missing the transition prefixes itself (CVE-2026-114730 / GHSA-8f6h-w7cq-8q8h, high, 1.6.14-<1.6.20 / 1.7.0-<1.7.5)¶
Fifth proof point for this page's invariant, and the cleanest evidence yet that denylist-over-address-spellings always lags the IETF transition space. Roundcube's rcube_utils::is_local_url() network blocklist omitted exactly the prefixes this page's battery teaches you to try: the RFC 6052 well-known NAT64 prefix 64:ff9b::/96, the RFC 8215 local-use NAT64 prefix 64:ff9b:1::/48, and the unspecified address ::/128, so http://[64:ff9b::7f00:1]/ (loopback embedded as the IPv4 half) passed the filter and reached loopback, link-local, and cloud-metadata addresses. The upstream fix commit adds precisely those three classes.
- Decision-table shortcut: when you fingerprint any SSRF blocklist (Roundcube
is_local_url, CloudrevecheckIP, KortixisPrivateIp, Pydantic AI metadata guard, all on this page or its sibling folds), probe the complete transition-prefix set in one pass: IPv4-mapped::ffff:, IPv4-compatible::x, 6to42002:, Teredo2001:db8::-wrapped, NAT64 well-known64:ff9b::, NAT64 local-use64:ff9b:1::,::unspecified, plus zone-ID spellings. Each independently-passing prefix is a separate reportable leg on the same guard, and the omission pattern tells you the guard enumerates known bypass spellings (i.e., it has a CVE history) rather than implementing resolve-then-classify. ::/128omission is its own fingerprint: the unspecified address as a destination is rarely thought about by blocklist authors (it's a bind-address concept in most libraries); includehttp://[::]:port/andhttp://[::ffff:7f00:1]/shapes in every SSRF battery, on some stacks::routes to local.- Same Roundcube wave tracked without standalone publication: ImageMagick resize path accepted SVG/EPS contact photos (folded on the Sept 20 media-pipeline page), alias-address login resolved across IMAP hosts without host-qualification (qc6m/114732, alternate-path identity-resolution class), CRLF mail-header injection pair (known framing class; the Oct 20
_uidIMAP-injection leg already lives on the June 9 Net::IMAP page).
November 20 follow-up: request-filtering-agent, an npm guard library classifying IPv4-compatible ::/96 as public unicast (CVE-2026-133706 / GHSA-2hg9-gwpm-h54q, medium, before 3.2.2)¶
Sixth proof point for this page's invariant, and the highest-leverage target class yet because it is a shared guard library: Google's request-filtering-agent (the SSRF filter npm packages and agent frameworks pin for outbound fetches) treated IPv4-compatible IPv6 addresses in the ::/96 range as public unicast, so http://[::7f00:1]/ reached loopback and http://[::a9fe:a9fe]/ reached link-local, cloud metadata included. The ::x IPv4-compatible spelling was already in this page's battery (Roundcube omitted it too) — the new lesson is where to aim it.
- Guard-library supply-chain recon: when a target embeds an SSRF-protection dependency (
request-filtering-agent, SSRF-aware axios/fetch wrappers, LangChain/agent-framework URL guards), fingerprint the library and version from the shipped bundle/lockfile behavior, then run this page's full transition-prefix battery against the library's own test suite expectations — one CVE in the library is N reachable findings in every product pinning it, and its public issue tracker/fix diff tells you exactly which spellings each pinned version still passes. Grepping a codebase forrequest-filtering-agentimports (or its error strings) is a faster SSRF triage step than probing each URL parameter blind. - Classification-table omission is distinct from normalization drift: unlike this page's zone-ID/stringify legs (validator and connect disagree), here the guard agrees with itself and simply maps a whole address class to the wrong bucket. Diagnostic: if
::7f00:1passes while::ffff:7f00:1is blocked, the guard enumerates spellings it has heard of (IPv4-mapped) and missed the older IPv4-compatible family — that asymmetry is the fingerprint of a class-table denylist and predicts further omissions; report each independently-passing class as its own leg. - Battery addendum:
::7f00:1(loopback),::a9fe:a9fe(169.254.169.254 metadata),::0, and the leading-zero-decimal hybrid spellings inside the::/96half (::127.0.0.1dotted form) all belong next to the existing::ffff:/ 6to4 / Teredo / NAT64 / zone-ID set in one pass.
November 27 follow-up: ToolJet guard resolver wired as dnsLookup instead of lookup (policy IP != connected IP) and Budibase deny-list missing [::] (CVE-2026-137969 / GHSA-jp62-vw2g-283c high; CVE-2026-137960 / GHSA-x9rj-x4cm-3fr3 medium, both fixed in the Nov 27 wave on the Nov 26 Budibase/ToolJet page)¶
Seventh and eighth proof points, and the first with a wiring-class root cause rather than a spelling omission. ToolJet's guard resolver was passed to the HTTP stack under the wrong option name (dnsLookup where the connector reads lookup): the guard resolved one IP, classified it, approved it, and the connection resolved again, independently, so a TTL-0 hostname alternating public/private between the two resolutions walked straight into blocked space. This is distinct from every prior leg here: those had validator-vs-connect drift inside one resolution chain; this one has two resolutions, and the policy never sees the second.
- Fingerprint: grep the fetch layer for resolver/lookup option names (
lookup,dnsLookup,resolver,agent.lookup,http.Agent({lookup})) and confirm the SAME function instance flows from the security check into the socket path. Node'shttp.requesthonorslookup; a library that exposes bothlookupanddnsLookup-style options invites exactly this swap. - Rebind probe for any guard that resolves: own a hostname with TTL-0 A records; first fetch returns your lab public listener, second returns
127.0.0.1/169.254.169.254; if the guard passes and the payload arrives, the guard is not on the connection path regardless of what its code claims. - Budibase's
[::]omission re-confirms the::/128rule from the Roundcube leg: the unspecified address as a destination keeps falling out of class-table denylists. The Budibase/ToolJet Nov 27 wave page carries the full twelve-leg table including ToolJet's NAT64/6to4 omission (qrv8/137970), which is this page's exact battery hitting a new vendor.