Synology DiskStation Manager 'imageSelector.cgi' Remote Command Execution Vulnerability

Summary
Synology DiskStation Manager is prone to a remote command-execution vulnerability.
Impact
An attacker can exploit this issue to execute arbitrary commands with root privileges.
Solution
Updates are available.
Insight
Synology DiskStation Manager (DSM) contains a flaw in the SliceUpload functionality provided by /webman/imageSelector.cgi. With a specially crafted request, a remote attacker can append data to files, allowing for the execution of arbitrary commands.
Affected
Synology DiskStation Manager 4.x are vulnerable other versions may also be affected.
Detection
This script tries to execute the 'id' command on the remote host using specially crafted requests.
References