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.
Originally disclosed on Cisco Talos
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.
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
- 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.
- Send the packet to the device's UDP port 8006.
- The device parses the JSON and uses 'nums' as the loop count.
- For each iteration, it constructs a key like 'domain1', 'domain2', etc., and looks up the value in the JSON.
- 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.
- 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.