CVE-2017-13089: GNU Wget: stack overflow in HTTP protocol handling

Published Oct 23, 2017
·
Updated

A stack-based buffer overflow vulnerability was found in HTTP protocol handling, potentially allowing a code execution.

The http.c:skipshortbody() function is called in some circumstances, such as when processing redirects. When the response is sent chunked, 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:fdread(). As fdread() takes an int argument, the high 32 bits of the chunk length are discarded, leaving fdread() with a completely attacker controlled length argument.

Other sources

The http.c:skipshortbody() 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:fdread(). As fdread() takes an int argument, the high 32 bits of the chunk length are discarded, leaving fdread() with a completely attacker controlled length argument.

MITRE

Affected Software

3 affected components
GNU Wget<=1.19.1
Debian Debian Linux=8.0
Debian Debian Linux=9.0

Event History

Oct 23, 2017
Data Sourced
via Red Hat·03:08 PM
DescriptionSeverityAffected Software
Oct 27, 2017
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

What is the severity of CVE-2017-13089?

CVE-2017-13089 is classified as a high severity vulnerability due to its potential impact on the affected systems.

2

How do I fix CVE-2017-13089?

To mitigate CVE-2017-13089, users should upgrade Wget to version 1.19.2 or later.

3

What versions of Wget are affected by CVE-2017-13089?

CVE-2017-13089 affects Wget versions up to and including 1.19.1.

4

Which operating systems are impacted by CVE-2017-13089?

CVE-2017-13089 impacts GNU Wget on Debian GNU/Linux versions 8.0 and 9.0.

5

What is the functionality impacted by CVE-2017-13089?

CVE-2017-13089 affects the chunk parser in Wget, specifically when processing chunked responses in certain scenarios.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203