CVE-2017-13089 GNU Wget: stack overflow in HTTP protocol handling
A stack overflow in GNU Wget's HTTP chunk parser allows attackers to cause denial of service or execute arbitrary code via crafted responses.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2017-13089?
CVE-2017-13089 is a high-severity memory corruption vulnerability in Debian Debian Linux, published on 27 Oct 2017. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
The http.c:skip_short_body() function is called in some circumstances, such as when processing redirects. When the response is sent chunked in wget before 1.19.2, the chunk parser uses strtol() to read each chunk's length, but doesn't check that the chunk length is a non-negative number. The code then tries to skip the chunk in pieces of 512 bytes by using the MIN() macro, but ends up passing the negative chunk length to connect.c:fd_read(). As fd_read() takes an int argument, the high 32 bits of the chunk length are discarded, leaving fd_read() with a completely attacker controlled length argument.
Which versions are affected by CVE-2017-13089?
It affects 2 products.
Products include Debian Debian Linux, Gnu Wget.
How do I fix CVE-2017-13089?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2017-13089 being exploited?
There is no known exploitation of CVE-2017-13089 in the wild and no public exploit code.
Public exploit code: 2 proofs of concept on GitHub.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2017-13089, DEBIAN-CVE-2017-13089, GHSA-3737-prh2-4m4p, UBUNTU-CVE-2017-13089.