Skip to content
RCE Write-up Advanced

UniBLEed: Unauthenticated Root RCE on Any Unitree G1 Humanoid Robot Within Bluetooth Range

A chain of flaws in the Unitree G1 humanoid robot allows an attacker within Bluetooth range to write to an unprotected GATT characteristic, obtain the robot's per-device AES key from a cloud endpoint that fails to check ownership, and then use that key to hijack the robot's WiFi and trigger a buffer overflow in the BLE daemon that executes a command as root. The result is unauthenticated remote code execution on the robot's Locomotion PC, and the exploit is wormable between robots in range.

Olivier Laflamme Follow

Published on boschko.ca

Root on a $20,000 humanoid robot, via a cloud API that decrypts any G1's AES key from any free Unitree account without checking ownership. One BLE characteristic that accepts writes without pairing.

Olivier Laflamme, on boschko.ca

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a combination of a Bluetooth characteristic registered with bare write permission, a cloud endpoint that decrypts a key blob without verifying the caller owns the robot, and unsafe string handling in the WiFi configuration script and BLE daemon.

Impact

An attacker within Bluetooth range could gain unauthenticated root code execution on the robot's Locomotion PC, and the exploit is wormable, meaning a compromised robot can spread it to other G1 robots in range.

What the attacker needed

Attacker within Bluetooth range; a free Unitree account; knowledge of the robot's serial number

The fix

Unitree implemented an account-to-robot cloud binding ownership check before returning the AES-128 key, and released firmware version 1.5.5.0 that reportedly blocks the exploit chain, though the author has not independently verified the fix.

How it was found

  1. Write to the unprotected GATT characteristic 0xFFE2 from a nearby BLE client without pairing.
  2. Send the cleartext bootstrap opcode 0xF2 to receive the robot's AES-128 key wrapped in RSA.
  3. Submit the wrapped key blob and the robot's serial number to the cloud bindExtData endpoint from any free account to get the plaintext AES key.
  4. Use the recovered key to complete the BLE v3 handshake and reach the WiFi configuration opcodes.
  5. Send a 121-byte PSK that forces wpa_connect.sh into its unsafe manual fallback, injecting wpa_supplicant configuration and making the robot join the attacker's hotspot.
  6. From that network, use the chat_go to bashrunner chain to leak the btgatt-server PIE base, then send a 1050-byte write through the 500-byte wifi_ssid buffer to corrupt the event loop into calling system() as root.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The robot has a short-range radio (Bluetooth) that lets nearby devices talk to it. One of its Bluetooth settings accepts messages from anyone nearby without asking for a password, and a cloud service will hand out the robot's secret key to any account holder who asks. With that key an attacker can make the robot join their WiFi network and then send it a specially crafted message that makes it run the attacker's command with full administrator rights.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Olivier Laflamme

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.