Skip to content
Memory corruption Advisory Advanced CVE-2021-21950CVE-2021-21951

Anker Eufy Homebase 2 home_security CMD_DEVICE_GET_SERVER_LIST_REQUEST out-of-bounds write vulnerability

An out-of-bounds write vulnerability exists in the CMD_DEVICE_GET_SERVER_LIST_REQUEST handling of the home_security binary on Anker Eufy Homebase 2. A specially crafted network packet can cause a write beyond the bounds of a buffer, leading to code execution.

Lilith >_> Follow

Originally disclosed on Cisco Talos

Critical 10.0 View original

An out-of-bounds write vulnerability exists in the CMDDEVICEGETSERVERLISTREQUEST functionality of the homesecurity binary of Anker Eufy Homebase 2 2.1.6.9h. A specially-crafted network packet can lead to code execution.

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 number of server domains from the JSON 'nums' field is used as a loop bound without validation, allowing writes beyond the fixed-size array.

Impact

An attacker could achieve code execution on the device.

What the attacker needed

Network access to UDP port 8006

The fix

The vulnerability was fixed by the vendor.

How it was found

  1. Craft a CMD_DEVICE_GET_SERVER_LIST_REQUEST packet with a JSON body containing a large 'nums' value and a corresponding 'domain' field with a long string.
  2. Send the packet to the device's UDP port 8006.
  3. The device parses the JSON and uses 'nums' as the loop count.
  4. For each iteration, it constructs a key like 'domain1', 'domain2', etc., and looks up the value in the JSON.
  5. If the value is found and its length is less than 0x80, it writes the value to an array at an offset calculated from the loop counter.
  6. By choosing a large 'nums' and a matching 'domain' key, the write occurs far beyond the array bounds, causing memory corruption.

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.

This device runs software that listens for network messages. A part of that software copies data into a fixed-size memory area without checking if the data fits. An attacker can send a message that makes the software write past the end of that area, which can crash the device or let the attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.