Remote Code Execution Vulnerability in GoAhead Servers

Another Big Flaw!! Researchers at Elttam  recently discovered a security flaw in GoAhead Web servers with versions running below 3.6.5. GoAhead is embedded Web Servers originally from Embedthis that is deployed in millions of devices including printers, IP phones, networking devices and many more. Among list of its clients, some of the famous ones are Avaya, Siemens, Canon, IBM, D-Links, Kodak, HP.

The vulnerability can be tracked using CVE-2017-17562 and exits in the “CGI handler” function in all versions prior to 3.6.5. Based on the Elttam report,

The vulnerability is a result of Initialising the environment of forked CGI scripts using untrusted HTTP request parameters, and will affect all user’s who have CGI support enabled with dynamically linked executables (CGI scripts). This behavior, when combined with the glibc dynamic linker, can be abused for remote code execution using special variables such as LD_PRELOAD”.

This vulnerability provides the ability to the remote attacker to send malicious HTTP CGI request that can POST payload in the request and the exploitation could lead to any arbitrary code execution on the server.

Shodan search reveals large number of devices (approx. more that 500,000) employing GoAhead server. So, as per now, number of these could be vulnerable.

A patch has been released regarding the vulnerability and all the users have been advised to upgrade to GoAhead 3.6.5 if dynamically linked CGI programs are being used on Linux Machines.

Elttam has also released POC that could be used to check if your GoAhead version is prone to attack and to ensure security against the attack. The test scripts by Elttam can be found here.

With large number of devices affected by this vulnerability, this seems to be a big trouble as large pool of affected devices is now prone to malicious attackers.