# CVE-2017-17562: Embedthis GoAhead Remote Code Execution

> Remote attackers can execute arbitrary code on GoAhead web servers by exploiting environment variable injection in CGI handlers when CGI is enabled.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 10 Dec 2021 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 12 Dec 2017
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-q5wm-274q-f3v6

## What is CVE-2017-17562?

CVE-2017-17562 is a high-severity code injection vulnerability in n/a, published on 12 Dec 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

## Which versions are affected by CVE-2017-17562?

It affects 2 products.


Products: Embedthis Goahead, Oracle Integrated Lights Out Manager.

## How do I fix CVE-2017-17562?

No fix has been published for CVE-2017-17562 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 10 Jun 2022.

## Is CVE-2017-17562 being exploited?

Yes. Attackers have exploited CVE-2017-17562 in the wild since at least 10 Dec 2021.

Public exploit code:

- Standalone Python 3 exploit for CVE-2017-17562 (github_poc): https://github.com/ivanitlearning/CVE-2017-17562
- 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. (github_poc): https://github.com/nu11pointer/goahead-rce-exploit
- CVE-2017-17562 GOAHEAD RCE (Author: Daniel Hodson) (github_poc): https://github.com/1337g/CVE-2017-17562
- PoC for CVE-2017-17562 written in bash (github_poc): https://github.com/joaomagfreitas/bash-CVE-2017-17562
- GoAhead Web Server 2.5 < 3.6.5 - HTTPd 'LD_PRELOAD' Remote Code Execution (exploitdb)
- GoAhead Web Server LD_PRELOAD Arbitrary Module Load (metasploit)

## Other vulnerabilities in n/a

- [CVE-2021-41615](https://insights.sbomify.com/CVE-2021-41615/): Weak cryptography in n/a (critical 9.8)
- [CVE-2021-43298](https://insights.sbomify.com/CVE-2021-43298/): Security feature bypass in goahead (critical 9.8)
- [CVE-2021-42342](https://insights.sbomify.com/CVE-2021-42342/): File upload in n/a (critical 9.8)
- [CVE-2019-5096](https://insights.sbomify.com/CVE-2019-5096/): Use after free in EmbedThis (critical 9.8)
- [CVE-2017-1000471](https://insights.sbomify.com/CVE-2017-1000471/): Null dereference in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-17562 and fix it if it is affected.

What it is: CVE-2017-17562 is a high-severity code injection vulnerability in n/a, published on 12 Dec 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2017-17562 in the wild since at least 10 Dec 2021.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2017-17562/ (Markdown: https://insights.sbomify.com/CVE-2017-17562/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2017-17562
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2017-17562
- OSV: https://osv.dev/vulnerability/CVE-2017-17562

---
From sbomify Insights: https://insights.sbomify.com/CVE-2017-17562/
Summaries are generated and may contain mistakes; the official description above is the record.
