Samsung SmartThings Hub video-core credentials videoHostUrl Code Execution Vulnerability
The video-core process on the Samsung SmartThings Hub incorrectly handles the videoHostUrl field from a JSON request, leading to a stack buffer overflow. An attacker can send a crafted HTTP request to crash the process or potentially execute arbitrary code.
Originally disclosed on Cisco Talos
An exploitable buffer overflow vulnerability exists in the credentials handler of video-core’s HTTP server of Samsung SmartThings Hub. The video-core process incorrectly extracts the videoHostUrl field from a user-controlled JSON payload, leading to a buffer overflow on the stack.
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 program copies a user-supplied string into a fixed-size stack buffer using memcpy with a length derived from strlen, without validating that the length fits the buffer.
Impact
An attacker could crash the video-core process or potentially execute arbitrary code with root privileges, but exploitation requires either impersonating the remote SmartThings servers or running a SmartApp that can make localhost connections.
What the attacker needed
Ability to impersonate remote servers or run a SmartApp; local connection to port 3000
The fix
The vendor patched the vulnerability, likely by adding a length check before copying the videoHostUrl string into the stack buffer.
How it was found
- Send a POST request to the /credentials endpoint with a JSON body containing the required s3 fields and a videoHostUrl value that is a very long string.
- The video-core process parses the JSON and extracts the videoHostUrl string.
- The string is passed to a URI parser and then copied into a fixed-size stack buffer without length checking, causing a buffer overflow.
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.
A buffer overflow happens when a program copies more data into a fixed-size memory area than it can hold, overwriting nearby memory. Here, the video-core program takes a web address from a user and copies it without checking its length, so an attacker can send a very long address to crash the program or 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.