Description
Embedthis GoAhead before 3.6.5 allows remote code execution if CGI is enabled and a CGI program is dynamically linked. This is a result of initializing the environment of forked CGI scripts using untrusted HTTP request parameters in the cgiHandler function in cgi.c. When combined with the glibc dynamic linker, this behaviour can be abused for remote code execution using special parameter names such as LD_PRELOAD. An attacker can POST their shared object payload in the body of the request, and reference it using /proc/self/fd/0.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
GoAhead Web Server LD_PRELOAD Arbitrary Module Load
exploit/linux/http/goahead_ldpreload
Exploit-DB 2
- GoAhead Web Server 2.5 < 3.6.5 - HTTPd 'LD_PRELOAD' Arbitrary Module Load (Metasploit) EDB-43877 · remote · Jan 24, 2018 · verified
- GoAhead Web Server 2.5 < 3.6.5 - HTTPd 'LD_PRELOAD' Remote Code Execution EDB-43360 · remote · Dec 18, 2017 · verified
GitHub 5 repositories
-
ivanitlearning/CVE-2017-17562 ★ 10 · Oct 16, 2019
Standalone Python 3 exploit for CVE-2017-17562
-
nu11pointer/goahead-rce-exploit ★ 8 · Nov 14, 2021
Exploit for CVE-2017-17562 vulnerability, that allows RCE on GoAhead (< v3.6.5) if the CGI is enabled and a CGI program is dynamically linked.
-
joaomagfreitas/bash-CVE-2017-17562 ★ 1 · Nov 17, 2021
PoC for CVE-2017-17562 written in bash
-
1337g/CVE-2017-17562 ★ 1 · Dec 27, 2017
CVE-2017-17562 GOAHEAD RCE (Author: Daniel Hodson)
-
crispy-peppers/Goahead-CVE-2017-17562 ★ 0 · Nov 23, 2019
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Embedthis GoAhead <3.6.5 - Remote Code Execution http/cves/2017/CVE-2017-17562.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Advisories 1
- ICSA-22-090-06 General Electric Renewable Energy MDS Radios CISA ICS & IT advisories · Mar 31, 2022
References
- https://github.com/elttam/advisories/tree/master/CVE-2017-17562
- 1040702 vdb-entry
- https://www.elttam.com.au/blog/goahead/
- 43360 exploit
- http://www.oracle.com/technetwork/security-advisory/cpuapr2018-3678067.html
- https://github.com/embedthis/goahead/commit/6f786c123196eb622625a920d54048629a7caa74
- https://github.com/embedthis/goahead/issues/249
- 43877 exploit