Skip to content
SSRF Write-up Advanced

*How I Tricked OpenClaw Into Attacking Its Own Network: A NAT64 SSRF Bypass*

OpenClaw's SSRF guard misread the embedded IPv4 address in RFC 8215 NAT64 /48 literals, reading the ignored suffix instead of the real embedded address. An authenticated user could craft an IPv6 literal that the guard saw as a public address but a NAT64 router forwarded to an internal or cloud metadata endpoint.

Anurag Mewar Follow

Published on infosecwriteups.com

AI Agent

Anurag Mewar, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

Context: an always-on assistant inside your trust boundary

OpenClaw (previously known as Clawdbot and Moltbot) is an AI assistant that runs on your devices, answers you on the channels you already use, speaks and listens on your phone and your computer, and grows with you over time. It has millions of active users, and thousands of endpoints run it as an always-on gateway.

That description has a security reading. An always-on gateway that runs on your devices and answers on the channels you already use is a long-lived process sitting inside your trust boundary: on your laptop, on a home server, or on a cloud box next to your other infrastructure. And one of its features is that the assistant can fetch URLs on your behalf.

Three paths do that fetching:

  • The web_fetch tool lets the agent go and grab a web page.
  • Image attachments in the chat completions API get downloaded server-side.
  • Inbound channel messages can carry media URLs that the gateway resolves and pulls.

Each of those is the assistant reaching out to the network from inside your perimeter, using your machine's network position. That is the exact shape of a Server-Side Request Forgery primitive. If an attacker can convince the assistant to fetch a URL of their choosing, and that URL resolves to something internal (a router's admin panel, a database bound to localhost, or the crown jewel of cloud SSRF, the metadata endpoint at [redacted]), the attacker has borrowed your server's identity to reach places they should never be able to touch.

The OpenClaw team knew this, which is why they built an SSRF guard.

Setup: the guard and what it was guarding against

The point of the guard is simple to state: before the gateway connects to any resolved address, block anything private, internal, loopback, link-local, or otherwise special-use. Resolve the hostname, look at every IP it points to, and if any of them is [redacted], or 10.x, or 169.254.x, or a carrier-grade-NAT metadata address, refuse the request and throw.

Blocking a plain dotted-quad is easy. The hard part is that IPv6 gives an attacker a dozen ways to smuggle an IPv4 address inside an IPv6 literal: IPv4-mapped addresses (::ffff:[redacted]), 6to4, Teredo, ISATAP, and the NAT64 / IPv4-embedded transition prefixes. A serious guard has to decode the embedded IPv4 out of each of those forms and check that, not just the IPv6 wrapper.

OpenClaw's guard does exactly this. It has a function called extractEmbeddedIpv4FromIpv6, whose entire job is to pull the real IPv4 out of these transition formats so the guard can judge the true destination. It leans on the well-respected library ipaddr.js to classify which transition format each address belongs to.

The bug lived not in a missing check but in a correct-looking one that read the wrong bytes.

Finding it: two NAT64 formats, one decoding path

The guard grouped two different NAT64 formats into a single case and decoded both of them the same way, by reading the last 32 bits of the address.

For the well-known NAT64 prefix (64:ff9b::/96), reading the last 32 bits is exactly right: that is where the embedded IPv4 lives. But ipaddr.js folds a second, larger prefix into the same classification: the RFC 8215 locally-assigned NAT64 prefix 64:ff9b:1::/48. In that format, per RFC 6052, the embedded IPv4 does not live in the last 32 bits. It lives up front, split across bits 48-63 and 72-87, with a reserved byte in the middle.

So for any 64:ff9b:1::/48 address, the guard was reading the wrong end of the address entirely. If the guard reads the trailing bits to decide safe or not safe, and those trailing bits are an ignored suffix that a real NAT64 router does not even route on, an attacker gets to put two different addresses into one IPv6 literal:

  • A private, internal target in the real embedded slot (bits 48-63 + 72-87): the address the NAT64 gateway will actually forward to.
  • A benign public decoy (say, Google's [redacted]) in the trailing bits: the only thing the guard ever looks at.

The guard sees [redacted], shrugs, and opens the gate. The router forwards to 169.254.169.254. The address, quite literally, lied.

From the original on infosecwriteups.com

Exploitation

Step 1: understand how NAT64 embeds an IPv4 address (RFC 6052)

NAT64 lets IPv6-only clients talk to IPv4-only servers. To do that, the IPv4 address gets embedded inside an IPv6 address using a special prefix. The layout has a deliberate hole in it: bits 64-71 form a reserved u-byte that must be zero. The IPv4 octets flow around that hole. For a prefix length of 48, RFC 6052 says the 32-bit IPv4 address a.b.c.d is placed as shown in the diagram below.

Crafted literal From the original on infosecwriteups.com

In the green rows, the suffix bits are ignored. RFC 6052 explicitly requires translators to treat any nonzero suffix as something to disregard. That is the property the attack abuses: the suffix is a place where you can write anything and a compliant NAT64 router will not care.

Step 2: see the guard's fatal shortcut

The essence of what OpenClaw's guard did is this: it asked ipaddr.js to classify the address, and for the rfc6052 class it read the trailing two hextets:

JavaScript
case "rfc6145":case "rfc6052":    return decodeIpv4FromHextets(parts[6], parts[7]);

The problem is upstream. ipaddr.js (v2.4.0) classifies two subnets as rfc6052:

JavaScript
rfc6052: [  [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],     [new IPv6([0x64, 0xff9b, 0x1, 0, 0, 0, 0, 0]), 48],  ],
  • For the /96 prefix, the IPv4 really is in the trailing 32 bits. Reading parts[6] / parts[7] is correct.
  • For the /48 prefix, the IPv4 is in bits 48-63 + 72-87 (hextets 3, 4, 5). The trailing bits (parts[6] / parts[7]) are the ignored suffix. Reading them is not just wrong; it is reading attacker-controlled scratch space.

Step 3: build the lying address

The goal is a literal that pins [redacted] (the AWS/GCP-style link-local metadata address) while showing the guard a friendly 8.8.8.8.

  • Target (real): [redacted], octets [169, 254, 169, 254], hex [0xa9, 0xfe, 0xa9, 0xfe]
  • Decoy (shown to the guard): [redacted], octets [8, 8, 8, 8], hex [0x08, 0x08, 0x08, 0x08]

Place the target octets in the RFC 6052 /48 slots and the decoy in the ignored suffix:

Text
hextet[0] = 0x0064  --->  /48 prefixhextet[1] = 0xff9b  --->  /48 prefixhextet[2] = 0x0001  --->  /48 prefix  (this is what makes it the RFC 8215 /48)hextet[3] = 0xa9fe  --->  IPv4 bytes 0,1hextet[4] = 0x00a9  --->  u-byte(0) : IPv4 byte 2hextet[5] = 0xfe00  --->  IPv4 byte 3 : (suffix)hextet[6] = 0x0808  --->  Ignored suffix (guard reads)hextet[7] = 0x0808  --->  Ignored suffix (guard reads)

Join them and you get the whole exploit in a single literal:

Text
[redacted]

Step 4: trace what each side sees

A compliant NAT64 router decodes per RFC 6052 /48:

  • byte 0 = high(0xa9fe) = 0xa9 = 169
  • byte 1 = low(0xa9fe) = 0xfe = 254
  • byte 2 = low(0x00a9) = 0xa9 = 169 (the 0x00 u-byte is discarded)
  • byte 3 = high(0xfe00) = 0xfe = 254

That is [redacted], the cloud metadata endpoint.

The vulnerable guard reads the trailing 32 bits, parts[6] / parts[7]:

  • 0x0808 = 8.8
  • 0x0808 = 8.8

That is [redacted], a normal public address. Given a crafted /48 literal, the guard always misreads it and always returns the decoy verdict. No timing, no race, no luck.

Root cause

The guard trusted a library's classification to imply a single memory layout, and that assumption was false for one of the two subnets folded under a shared label. ipaddr.js returns the same rfc6052 class for 64:ff9b::/96 and 64:ff9b:1::/48, but the two prefixes place the embedded IPv4 at different bit positions. The guard's decoder hard-coded the /96 layout (the trailing two hextets) for both.

It is a parser-differential bug: the guard and the NAT64 router both understand the same address, but they parse it differently, and the attacker lives in the gap. The abused property was a design feature of the standard. RFC 6052 mandates that suffix bits be ignored, and that mandate created free scratch space for a decoy. The standard did its job; the implementation read the wrong half of the address.

This is worth contrasting with the usual finding. A missing SSRF check is not difficult to find: a scanner flags it, a reviewer notices the fetch has no guard. This guard was thorough. It decoded IPv4-mapped, 6to4, Teredo, ISATAP and the well-known NAT64 prefix, a genuinely careful piece of defensive code. The interesting vulnerabilities now live not in the absence of security controls but in the seams between two systems that almost agree.

Impact

The end-to-end SSRF has one precondition: the host running OpenClaw has to have an actual RFC 8215 64:ff9b:1::/48 NAT64 gateway on its network, because something has to forward the crafted address to the private target. On a host with that NAT64 setup, an authenticated user could steer web_fetch, image-URL ingestion, and inbound media fetches at internal and cloud-metadata endpoints, straight through a guard that was specifically built to stop exactly that.

The OpenClaw team confirmed the high severity SSRF quickly and pushed the fix to everyone.

Fix

The fix is shipped. It landed in v2026.8.1 and is in every release since, so updating your OpenClaw instance to the latest version closes this completely. No other action is needed.

The bug was present for a stretch of older versions: definitely the beta builds from 2026.7.2-beta.1 to 2026.8.1-beta.2, and possibly some stable versions before that. The exact list of affected old versions is still being worked out with the OpenClaw team. You do not need to wait for it: whatever version you were on before, updating to the latest fixes it.

From the original on infosecwriteups.com

Patched here: https://github.com/openclaw/openclaw/pull/123241

Variants to test

  1. Other transition formats with multiple layouts under one label. Take every format your guard decodes (IPv4-mapped, 6to4, Teredo, ISATAP, NAT64) and check whether the library classifies more than one prefix length or layout under the same name. A positive result is a classification that covers two prefixes whose embedded IPv4 sits at different bit offsets, with your decoder handling only one of them.
  2. Ignored and reserved bits as decoy space. Anywhere a protocol says these bits do not matter, put a benign public address there and the real internal target in the routed slot. A positive result is a guard that reports the decoy while the forwarding device reaches the internal address.
  3. Adversarial encoding tests. Write tests that exercise the crafted-decoy case, not just honest encodings. A test that only uses the well-behaved layout will validate a decoder that reads the wrong bytes, because on honest input the wrong bytes happen to hold the right answer. A positive result is a test suite that fails on the crafted literal and passes on the honest one.
  4. Confirm the layout, do not infer it from the label. When reviewing an SSRF guard, check that each decoder confirms the prefix length and byte positions rather than trusting a classification string. A positive result is a code path where the label drives the offset arithmetic.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 17 min read.

What happened, in plain words

OpenClaw is an AI assistant that runs on your own computer, phone or server. You talk to it through chat apps you already use, and it can also do things for you, including going to fetch a web page when you ask it to. Because it runs inside your own network, it can reach things that the outside world cannot: your router's settings page, a database that only listens on the same machine, or the special address that cloud providers use to hand out secret credentials to their servers.

A feature that lets the assistant fetch any web address is therefore a security risk. If someone can make the assistant fetch an address of their choosing, and that address points at something internal, the attacker has effectively borrowed your machine's position inside your network. This class of bug is called Server-Side Request Forgery, or SSRF. The OpenClaw team knew about this and built a guard that checks every address before the assistant connects to it, refusing anything private or internal.

The guard was careful, but it had one wrong assumption. It asked a helper library what kind of address it was looking at, and for one family of addresses (called NAT64) the library gave the same label to two different layouts. The guard decoded both layouts the same way, reading the wrong part of the address for one of them. An attacker could therefore write one IPv6 address that looks public to the guard but is routed by the network to a private target. The guard saw a harmless address such as [redacted] and let the request through; the network sent it to [redacted], the cloud metadata endpoint.

The fix has shipped. Updating OpenClaw to the latest version closes the hole.

An AI assistant with keys to your whole network

OpenClaw, previously known as Clawdbot and Moltbot, is an AI assistant that runs on your devices. It answers you on the channels you already use, speaks and listens on your phone and your computer, and grows with you over time. It has millions of active users, and thousands of endpoints run it as an always-on gateway.

An "always-on gateway" is a program that keeps running in the background, waiting for requests. Think of it as a receptionist who never goes home: it sits at the door of your building and lets messages in and out. Because it runs on your laptop, your home server or a cloud machine next to your other infrastructure, it sits inside your trust boundary. Your trust boundary is simply the line around the things you consider yours and protected: your home network, your cloud account, your private files.

One of OpenClaw's features is that the assistant can fetch URLs on your behalf. A URL is a web address, the thing you type into a browser's address bar. Three paths do that fetching:

  • The web_fetch tool lets the agent go and grab a web page. An agent here means the AI program acting on its own to complete a task.
  • Image attachments in the chat completions API get downloaded server-side. An API is a way for two programs to talk to each other, like a waiter taking your order to the kitchen and bringing back the food. "Server-side" means the download happens on the machine running the service, not on your device.
  • Inbound channel messages can carry media URLs that the gateway resolves and pulls. "Resolving" a URL means looking up which numeric address on the internet it points to, the way a phone book turns a name into a number.

Each of those is the assistant reaching out to the network from inside your perimeter, using your machine's network position. That is the exact shape of an SSRF primitive. A primitive here means the basic building block of an attack: the ability to make a server send a request somewhere.

If an attacker can convince the assistant to fetch a URL of their choosing, and that URL resolves to something internal, the attacker has borrowed your server's identity to reach places they should never be able to touch. The internal things worth reaching include a router's admin panel, a database bound to localhost (meaning it only accepts connections from the same machine), or the crown jewel of cloud SSRF: the metadata endpoint at 169.254.169.254.

The metadata endpoint is the crown jewel of cloud SSRF: it is reachable only from inside the machine.

The OpenClaw team knew this, which is why they built an SSRF guard.

The guard, and the thing it was guarding against

The point of the guard is simple to state: before the gateway connects to any resolved address, block anything private, internal, loopback, link-local, or otherwise special-use. Resolve the hostname, look at every IP it points to, and if any of them is [redacted], or 10.x, or 169.254.x, or a carrier-grade-NAT metadata address, refuse the request and throw.

Some of those terms need unpacking. An IP address is the numeric address of a machine on a network, like a street address for computers. A hostname is the human-friendly name, such as example.com, that gets translated into an IP address. Loopback is the address a machine uses to talk to itself, 127.0.0.1. Link-local addresses are a reserved range used for automatic configuration on a local network segment, and 169.254.x is one such range. Carrier-grade NAT is a technique internet providers use to share one public address among many customers, and it has its own reserved ranges.

Blocking a plain dotted-quad is easy. A dotted-quad is just the familiar four-numbers-with-dots form of an IPv4 address, like 127.0.0.1. The hard part is that IPv6, the newer and much larger version of the addressing system, gives an attacker a dozen ways to smuggle an IPv4 address inside an IPv6 literal. A literal is an address written out in text. The smuggling formats include IPv4-mapped addresses (::ffff:[redacted]), 6to4, Teredo, ISATAP, and the NAT64 / IPv4-embedded transition prefixes. A serious guard has to decode the embedded IPv4 out of each of those forms and check that, not just the IPv6 wrapper.

OpenClaw's guard does exactly this. It has a function called extractEmbeddedIpv4FromIpv6, whose entire job is to pull the real IPv4 out of these transition formats so the guard can judge the true destination. A function is a named block of code that does one job. It leans on the well-respected library ipaddr.js to classify which transition format each address belongs to. A library is a bundle of code written by someone else that your program uses instead of writing everything from scratch.

The bug lived not in a missing check but in a correct-looking one that read the wrong bytes.

The moment it clicked

The guard grouped two different NAT64 formats into a single case and decoded both of them the same way, by reading the last 32 bits of the address.

NAT64 is a translation service that lets IPv6-only machines talk to IPv4-only servers. It works by embedding the IPv4 address inside an IPv6 address using a special prefix. A prefix is the fixed beginning of an address that marks it as belonging to a particular purpose, like a postcode identifying a neighbourhood. A bit is the smallest unit of digital information, a single 0 or 1, and 32 bits is the size of an IPv4 address.

For the well-known NAT64 prefix (64:ff9b::/96), reading the last 32 bits is exactly right: that is where the embedded IPv4 lives. The /96 is a prefix length, telling you how many leading bits are fixed. But ipaddr.js folds a second, larger prefix into the same classification: the RFC 8215 locally-assigned NAT64 prefix 64:ff9b:1::/48. In that format, per RFC 6052, the embedded IPv4 does not live in the last 32 bits. It lives up front, split across bits 48-63 and 72-87, with a reserved byte in the middle.

An RFC is a published technical standard, a shared rulebook that vendors follow so their systems interoperate. So for any 64:ff9b:1::/48 address, the guard was reading the wrong end of the address entirely. If the guard reads the trailing bits to decide safe or not safe, and those trailing bits are an ignored suffix that a real NAT64 router does not even route on, an attacker gets to put two different addresses into one IPv6 literal:

  • A private, internal target in the real embedded slot (bits 48-63 + 72-87): the address the NAT64 gateway will actually forward to.
  • A benign public decoy (say, Google's [redacted]) in the trailing bits: the only thing the guard ever looks at.

The guard sees [redacted], shrugs, and opens the gate. The router forwards to 169.254.169.254. The address, quite literally, lied.

From the original on infosecwriteups.com

Why this is dangerous

Given a crafted /48 literal, the guard always misreads it and always returns the decoy verdict. No timing, no race, no luck. A race condition is a bug that depends on two things happening in an unlucky order; this one does not need any luck at all, because the misreading is deterministic.

The end-to-end SSRF here has one precondition: the host running OpenClaw has to have an actual RFC 8215 64:ff9b:1::/48 NAT64 gateway on its network, because something has to actually forward the crafted address to the private target. A precondition is a condition that must be true before the attack works. On a host with that NAT64 setup, an authenticated user could steer web_fetch, image-URL ingestion, and inbound media fetches at internal and cloud-metadata endpoints, straight through a guard that was specifically built to stop exactly that. "Authenticated" means the user has logged in and has an account.

Science behind the bypass

Now the fun part. Let's build the lying address, bit by bit, and see precisely why the guard was fooled.

How NAT64 embeds an IPv4 address (RFC 6052)

NAT64 lets IPv6-only clients talk to IPv4-only servers. To do that, the IPv4 address gets embedded inside an IPv6 address using a special prefix. The layout has a deliberate hole in it: bits 64-71 form a reserved u-byte that must be zero. The IPv4 octets flow around that hole. An octet is a group of eight bits, and an IPv4 address is four octets. For a prefix length of 48, RFC 6052 says the 32-bit IPv4 address a.b.c.d is placed as shown in the diagram below.

Crafted literal From the original on infosecwriteups.com

In the green rows, the suffix bits are ignored. A suffix is the part of the address after the fixed prefix. RFC 6052 explicitly requires translators to treat any nonzero suffix as something to disregard. That is the property the attack abuses: the suffix is a place where you can write anything and a compliant NAT64 router will not care.

The guard's fatal shortcut

The essence of what OpenClaw's guard did is this: it asked ipaddr.js to classify the address, and for the rfc6052 class it read the trailing two hextets:

JavaScript
case "rfc6145":case "rfc6052":    return decodeIpv4FromHextets(parts[6], parts[7]);

This is a snippet of JavaScript, the programming language the library is written in. Line by line:

  • case "rfc6145": and case "rfc6052": are labels in a switch statement, a way of saying "if the classification is one of these, do the following". The classification comes from the library.
  • return decodeIpv4FromHextets(parts[6], parts[7]); calls a helper that turns two 16-bit chunks of the address into an IPv4 address. A hextet is a group of four hexadecimal digits, the chunks an IPv6 address is written in. parts[6] and parts[7] are the seventh and eighth hextets, that is, the last 32 bits.

The problem is upstream. Upstream here means in the library the guard relies on. ipaddr.js (v2.4.0) classifies two subnets as rfc6052:

JavaScript
rfc6052: [  [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],     [new IPv6([0x64, 0xff9b, 0x1, 0, 0, 0, 0, 0]), 48],  ],

This is a data structure, a way of storing related values together. Line by line:

  • rfc6052: is the name of the classification.
  • The outer square brackets hold a list of two entries.
  • The first entry, [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96], is the well-known prefix written as eight hextets, paired with the prefix length 96.
  • The second entry, [new IPv6([0x64, 0xff9b, 0x1, 0, 0, 0, 0, 0]), 48], is the locally-assigned prefix, paired with the prefix length 48.
  • 0x at the start of a number means it is written in hexadecimal, base 16, which is convenient for grouping bits.

So the library says "both of these are rfc6052", and the guard treats them identically:

  • For the /96 prefix, the IPv4 really is in the trailing 32 bits. Reading parts[6] / parts[7] is correct.
  • For the /48 prefix, the IPv4 is in bits 48-63 + 72-87 (hextets 3, 4, 5). The trailing bits (parts[6] / parts[7]) are the ignored suffix. Reading them is not just wrong; it is reading attacker-controlled scratch space.

Building the lying address

The goal is a literal that pins [redacted] (the AWS/GCP-style link-local metadata address) while showing the guard a friendly 8.8.8.8. AWS and GCP are cloud providers; the report calls this the AWS/GCP-style link-local metadata address.

  • Target (real): [redacted], octets [169, 254, 169, 254], hex [0xa9, 0xfe, 0xa9, 0xfe]
  • Decoy (shown to the guard): [redacted], octets [8, 8, 8, 8], hex [0x08, 0x08, 0x08, 0x08]

Place the target octets in the RFC 6052 /48 slots and the decoy in the ignored suffix:

Text
hextet[0] = 0x0064  --->  /48 prefixhextet[1] = 0xff9b  --->  /48 prefixhextet[2] = 0x0001  --->  /48 prefix  (this is what makes it the RFC 8215 /48)hextet[3] = 0xa9fe  --->  IPv4 bytes 0,1hextet[4] = 0x00a9  --->  u-byte(0) : IPv4 byte 2hextet[5] = 0xfe00  --->  IPv4 byte 3 : (suffix)hextet[6] = 0x0808  --->  Ignored suffix (guard reads)hextet[7] = 0x0808  --->  Ignored suffix (guard reads)

Line by line:

  • hextet[0] = 0x0064 is the first chunk of the prefix, the 64 in 64:ff9b:1::.
  • hextet[1] = 0xff9b is the second chunk, ff9b.
  • hextet[2] = 0x0001 is the third chunk, 1. Together these three chunks are what makes it the RFC 8215 /48 prefix.
  • hextet[3] = 0xa9fe holds the first two bytes of the target, 169 and 254, packed together.
  • hextet[4] = 0x00a9 holds the reserved zero byte and the third byte of the target, 169. The zero is the u-byte that must be zero.
  • hextet[5] = 0xfe00 holds the fourth byte of the target, 254, followed by zero padding.
  • hextet[6] = 0x0808 and hextet[7] = 0x0808 are the ignored suffix, spelling out 8.8.8.8. These are the only chunks the guard reads.

Join them and you get the whole exploit in a single literal:

Text
[redacted]

Trace what each side sees

A compliant NAT64 router decodes per RFC 6052 /48:

  • byte 0 = high(0xa9fe) = 0xa9 = 169
  • byte 1 = low(0xa9fe) = 0xfe = 254
  • byte 2 = low(0x00a9) = 0xa9 = 169 (the 0x00 u-byte is discarded)
  • byte 3 = high(0xfe00) = 0xfe = 254

"High" means the upper half of a 16-bit chunk and "low" the lower half. That is [redacted], the cloud metadata endpoint.

The vulnerable guard reads the trailing 32 bits, parts[6] / parts[7]:

  • 0x0808 = 8.8
  • 0x0808 = 8.8

That is [redacted], a normal public address. No timing, no race, no luck.

Why I find this beautiful

A missing SSRF check is not difficult to find: a scanner flags it, a reviewer notices the fetch has no guard. A scanner is an automated tool that looks for known patterns. This guard was thorough. It decoded IPv4-mapped, 6to4, Teredo, ISATAP and the well-known NAT64 prefix, a genuinely careful piece of defensive code. The interesting vulnerabilities now live not in the absence of security controls but in the seams between two systems that almost agree.

A parser-differential bug is one where two programs read the same input differently. The guard and the NAT64 router both understand the same address, but they parse it differently, and the attacker lives in the gap. The abused property was a design feature of the standard. RFC 6052 mandates that suffix bits be ignored, and that mandate created free scratch space for a decoy. The standard did its job; the implementation read the wrong half of the address.

Timeline and affected versions

The fix is shipped. It landed in v2026.8.1 and is in every release since, so updating your OpenClaw instance to the latest version closes this completely. No other action is needed.

The bug was present for a stretch of older versions: definitely the beta builds from 2026.7.2-beta.1 to 2026.8.1-beta.2, and possibly some stable versions before that. A beta build is an early test version released before the final one. The exact list of affected old versions is still being worked out with the OpenClaw team. You do not need to wait for it: whatever version you were on before, updating to the latest fixes it.

From the original on infosecwriteups.com

Patched here: https://github.com/openclaw/openclaw/pull/123241

A pull request, or PR, is a proposed change to a codebase on a platform such as GitHub, where other developers can review it before it is merged.

Takeaways for defenders

If you build or review SSRF guards, four things from this report are worth carrying forward:

  1. Other transition formats with multiple layouts under one label. Take every format your guard decodes (IPv4-mapped, 6to4, Teredo, ISATAP, NAT64) and check whether the library classifies more than one prefix length or layout under the same name. A positive result is a classification that covers two prefixes whose embedded IPv4 sits at different bit offsets, with your decoder handling only one of them.
  2. Ignored and reserved bits as decoy space. Anywhere a protocol says these bits do not matter, put a benign public address there and the real internal target in the routed slot. A positive result is a guard that reports the decoy while the forwarding device reaches the internal address.
  3. Adversarial encoding tests. Write tests that exercise the crafted-decoy case, not just honest encodings. A test that only uses the well-behaved layout will validate a decoder that reads the wrong bytes, because on honest input the wrong bytes happen to hold the right answer. A positive result is a test suite that fails on the crafted literal and passes on the honest one.
  4. Confirm the layout, do not infer it from the label. When reviewing an SSRF guard, check that each decoder confirms the prefix length and byte positions rather than trusting a classification string. A positive result is a code path where the label drives the offset arithmetic.

Glossary

  • API: a way for two programs to talk to each other, like a waiter carrying orders between you and the kitchen.
  • Agent: an AI program that acts on its own to complete a task.
  • Authenticated: having logged in and proven you have an account.
  • Beta build: an early test version of software released before the final one.
  • Bit: the smallest unit of digital information, a single 0 or 1.
  • Carrier-grade NAT: a technique internet providers use to share one public address among many customers.
  • Dotted-quad: the familiar four-numbers-with-dots form of an IPv4 address, such as 127.0.0.1.
  • Function: a named block of code that does one job.
  • Hextet: a group of four hexadecimal digits, the chunks an IPv6 address is written in.
  • Hostname: the human-friendly name of a machine, such as example.com, that gets translated into an IP address.
  • IP address: the numeric address of a machine on a network.
  • IPv4: the older addressing system that uses 32-bit addresses written as four numbers.
  • IPv6: the newer addressing system that uses much larger addresses written as groups of hexadecimal digits.
  • Library: a bundle of code written by someone else that your program uses.
  • Link-local: a reserved address range used for automatic configuration on a local network segment.
  • Literal: an address or value written out in text in code.
  • Loopback: the address a machine uses to talk to itself, 127.0.0.1.
  • Metadata endpoint: a small internal cloud service at [redacted] that hands out information about the machine, including temporary credentials.
  • NAT64: a translation service that lets IPv6-only machines talk to IPv4-only servers by embedding the IPv4 address inside an IPv6 address.
  • Octet: a group of eight bits; an IPv4 address is four octets.
  • Parser-differential bug: a bug where two programs read the same input differently, and the attacker exploits the gap.
  • Precondition: a condition that must be true before an attack works.
  • Prefix: the fixed beginning of an address that marks it as belonging to a particular purpose.
  • Prefix length: the number of leading bits in an address that are fixed, written after a slash.
  • Pull request (PR): a proposed change to a codebase that others can review before it is merged.
  • Race condition: a bug that depends on two things happening in an unlucky order.
  • Resolve: to look up which numeric address a hostname or URL points to.
  • RFC: a published technical standard that vendors follow so their systems interoperate.
  • Server-side: happening on the machine running the service, not on your device.
  • SSRF (Server-Side Request Forgery): a bug where an attacker makes a server send a request to a destination of the attacker's choosing, often an internal one.
  • Suffix: the part of an address after the fixed prefix.
  • Trust boundary: the line around the things you consider yours and protected.
  • u-byte: a reserved byte in the NAT64 layout that must be zero.
  • Upstream: in the library that your code relies on.
  • URL: a web address, the thing you type into a browser's address bar.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.