The vulnerability exists because the OpenClaw clients on multiple platforms (iOS, Android, macOS, and CLI) improperly trusted unauthenticated information from mDNS/Bonjour discovery TXT records. This allowed a local network attacker to perform two main actions:
-
Connection Steering: By advertising a rogue _openclaw-gw._tcp service, an attacker could provide malicious lanHost or tailnetDns values in the TXT record. Vulnerable clients would prioritize these hints for routing, causing them to connect to an attacker-controlled IP address instead of the legitimate gateway.
-
TLS Pinning Bypass: The discovery mechanism also included a gatewayTlsSha256 TXT record. Vulnerable clients would accept this fingerprint to pin the gateway's TLS certificate, even on the first connection (a flaw in Trust On First Use). This allowed an attacker to perform a man-in-the-middle (MITM) attack by presenting their own certificate and having the client trust it, potentially leading to the exfiltration of gateway credentials.
The analysis of the patch d583782ee322a6faa1fe87ae52455e0d349de586 reveals the vulnerable functions across the different client applications. The fix involves several key changes:
- Prioritizing the resolved service endpoint (from SRV/A/AAAA records) for routing over hints from TXT records.
- Preventing a discovery-provided TLS fingerprint from overriding a previously stored, trusted pin.
- Requiring that auto-connections are only made to gateways that are already trusted (i.e., have a stored TLS pin).
The identified vulnerable functions are the specific entry points where this unauthenticated data was processed and used to establish connections, making them the critical points of failure during an exploit.