Anker Eufy Homebase 2 home_security CMD_DEVICE_GET_RSA_KEY_REQUEST authentication bypass vulnerability
The home_security binary of the Anker Eufy Homebase 2 uses a hardcoded AES key to decrypt an RSA public key sent by the cloud, then encrypts a secret session key with that RSA key. An attacker can send a crafted CMD_DEVICE_GET_RSA_KEY_REQUEST packet to replace the RSA key and obtain the session key, gaining owner-level access.
Originally disclosed on Cisco Talos
An authentication bypass vulnerability exists in the CMDDEVICEGETRSAKEYREQUEST functionality of the homesecurity binary of Anker Eufy Homebase 2 2.1.6.9h. A specially-crafted set of network packets can lead to increased privileges.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The device uses a hardcoded AES key to decrypt an attacker-supplied RSA public key, allowing the attacker to control the key used to encrypt the session key.
Impact
An attacker could gain access equal to that of the device owner's phone app, allowing control over the device.
What the attacker needed
Network access to the device; ability to send crafted UDP packets
The fix
The vendor patched the vulnerability, likely by removing the hardcoded AES key and using a secure key exchange.
How it was found
- Send a CMD_DEVICE_GET_RSA_KEY_REQUEST packet with a time field of 0 to make the device use the known AES key.
- Encrypt an attacker-controlled RSA public key with that AES key and include it in the packet body.
- The device decrypts the RSA public key and uses it to encrypt its secret session key.
- The device sends back the encrypted session key, which the attacker decrypts with their RSA private key.
- Use the recovered session key to authenticate subsequent commands and gain owner-level access.
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 report has not been written yet. The Original tab links to the source.
The device and the cloud share a secret key to authenticate commands. The device uses a fixed, publicly known key to set up a new secret, so anyone who knows that fixed key can pretend to be the cloud and take over the device.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.