All posts
Write-up ~5 min read

The address your SSRF filter can’t see: a NAT64 bypass in mcp-atlassian

An SSRF guard that decoded one IPv6 form trusted all the others. How an internal IPv4 address hidden inside an IPv6 one slips past the filter, and when it actually reaches its target.

Affected
mcp-atlassian (PyPI) < 0.24.1, patched in 0.24.1
Weakness
CWE-918 · Server-Side Request Forgery
Reading
~5 min · 10 Nov 2026

Credit: I reported this independently and am listed as a finder on the advisory. The primary reporter is tonghuaroot, and my report was closed as a duplicate of theirs.

Most SSRF defences come down to one idea: resolve the host, check the IP against a list of forbidden ranges, and refuse if it matches. Block loopback, the private ranges and the cloud metadata address at 169.254.169.254, and you are supposed to be safe.

That holds only if your IP parser sees the same address the network does. This post is about the gap between the two, and it starts with a feature IPv6 has had from the beginning.

An IPv6 address can be an IPv4 address in disguise

When the move from IPv4 to IPv6 began, the two had to interoperate. The standards added transition formats to IPv6: address shapes that carry an IPv4 address inside a v6 one, so a v6-only host can still reach a v4 destination through a gateway.

Form Prefix Carries 169.254.169.254 as
IPv4-mapped ::ffff:0:0/96 ::ffff:169.254.169.254
NAT64 (well-known) 64:ff9b::/96 64:ff9b::a9fe:a9fe
6to4 2002::/16 2002:a9fe:a9fe::1
IPv4-compatible (deprecated) ::/96 ::a9fe:a9fe

The detail that matters: a NAT64 gateway given 64:ff9b::a9fe:a9fe takes the last 32 bits (a9fe:a9fe = 169.254.169.254) and routes there. A language’s IP library does not. To Python’s ipaddress, 64:ff9b::a9fe:a9fe is an ordinary global IPv6 address: is_global is true and is_private is false. It does not know an internal IPv4 address is embedded in it.

The network decodes the hidden address and the filter doesn’t. That mismatch is a whole class of SSRF bypass.

The bug in mcp-atlassian

mcp-atlassian is an MCP server that connects AI clients to Jira and Confluence. The Atlassian base URL can be supplied per request through a header, so the server ships an SSRF guard applied at three layers: request validation, redirect handling, and a DNS-pinning connection adapter. All three call one classifier, so one gap in that classifier defeats all three.

The SSRF classifier, before the fixPython
def _check_ip_address(hostname: str) -> str | None:
    try:
        addr = ipaddress.ip_address(hostname)
    except ValueError:
        return None
    # Handle IPv4-mapped IPv6 (e.g., ::ffff:127.0.0.1)
    if isinstance(addr, ipaddress.IPv6Address) and addr.ipv4_mapped:
        addr = addr.ipv4_mapped        # only ::ffff:a.b.c.d is decoded
    if not addr.is_global:
        return f"Blocked IP address: {hostname} (non-global)"
    return None

The guard decodes exactly one transition form, IPv4-mapped, because the standard library makes that a one-liner. A NAT64 address is not IPv4-mapped, so it stays raw IPv6. is_global is true for the whole 64:ff9b::/96 block regardless of the IPv4 inside, and the function returns “allowed”. (6to4 and IPv4-compatible get through the same way. Teredo is the exception: Python already reports it as non-global, so this guard catches it. These results are from Python 3.11. Newer releases (3.12.4+, 3.13) updated the special-purpose address tables, so 6to4 and the local-use NAT64 prefix 64:ff9b:1::/48 may already be reported as non-global there. The well-known NAT64 prefix 64:ff9b::/96 is globally routable per IANA and stays is_global == True on every version, so the core bypass holds regardless. Test on the Python you actually ship.)

Does the request actually arrive?

The filter bypass is unconditional. Whether the packet then reaches the embedded IPv4 depends on the network, and I would rather be precise about that than claim instant metadata theft:

  • A translator on the well-known prefix 64:ff9b::/96 is not supposed to forward non-global IPv4 addresses (RFC 6052 §3.1), so a compliant one drops a 169.254.… target.
  • Local-use and operator-chosen NAT64 prefixes routinely map to internal ranges. An internal 10.x service reached from an IPv6-only workload is the realistic case.
  • Loopback is the translator’s loopback, not the server’s.

So treat it as a filter bypass whose impact depends on egress, and confirm the translation path in the target environment before claiming metadata access.

Proving it

My own report confirmed the bypass at the Python level: calling the classifier with ::ffff:169.254.169.254 was blocked, while 64:ff9b::a9fe:a9fe, 2002:a9fe:a9fe:: and ::a9fe:a9fe were allowed. The primary report on the advisory goes further and drives the official Docker image over the wire, sending the base-URL header with each spelling of an internal address. The guard rejects the plain 169.254.169.254 and the IPv4-mapped form. The NAT64 forms return the same response as an ordinary public IP, which means they passed the filter and only failed later on an unrelated check. That difference in response shows the guard let them through.

How to find it in your own code

  • Grep for SSRF guards that decode addr.ipv4_mapped and nothing else before an is_global / is_private / blocklist test. If there is no handling of 64:ff9b::/96 (NAT64), 2002::/16 (6to4) or ::/96 (IPv4-compatible), the guard is bypassable.
  • Look for one helper shared by many layers. When middleware, redirect handling and connection pinning all call one classifier, a single gap there affects every layer, and the fix has to land in that one place.
  • Test with a matrix, not a single IP. Validate the guard against the whole transition table, not only 127.0.0.1 and 169.254.169.254.

The fix

Decode the embedded IPv4 from every transition form in the shared helper, run the private/blocklist check on the extracted IPv4, and also reject non-global IPv6. is_global alone is not enough, because it reports these forms as global. Fixed in 0.24.1.

(One subtlety for anyone writing the fix: with NAT64’s local-use prefix 64:ff9b:1::/48 the operator chooses the prefix length, so the embedded IPv4 can sit at different byte offsets and “take the last 32 bits” is not sufficient. The mcp-atlassian fix sidesteps this by rejecting 64:ff9b:1::/48 outright. The alternative is to check every candidate offset.)

Disclosure timeline

Date Event
2026-10-23 My independent report filed via GitHub private vulnerability reporting (GHSA-xwv2-6w22-jj3v), later closed as a duplicate of GHSA-85p8-f4j5-j5jp (primary reporter: tonghuaroot)
2026-11-08 Fix commit 08a09b1 (“judge IPv6 transition addresses by their embedded IPv4”) lands
2026-11-08 mcp-atlassian 0.24.1 released on PyPI with the fix
2026-11-08 Advisory GHSA-85p8-f4j5-j5jp published, crediting me as a finder
2026-11-10 This write-up

References

Takeaway

Your SSRF filter has to see the address the network sees.

Decode every IPv4-in-IPv6 form before the block check, and test with the full transition table, not just 127.0.0.1.