Skip to content
Access control Advisory Advanced CVE-2021-21952

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.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 9.4 View original

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.

Lilith >_>, on Cisco Talos

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

  1. Send a CMD_DEVICE_GET_RSA_KEY_REQUEST packet with a time field of 0 to make the device use the known AES key.
  2. Encrypt an attacker-controlled RSA public key with that AES key and include it in the packet body.
  3. The device decrypts the RSA public key and uses it to encrypt its secret session key.
  4. The device sends back the encrypted session key, which the attacker decrypts with their RSA private key.
  5. 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.

More by Lilith >_>

View all

148 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.