CVE-2017-13090: GNU Wget: heap overflow in HTTP protocol handling

Published Oct 23, 2017
·
Updated

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

The retr.c:fdreadbody() function is called when processing OK responses. 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 read the chunk in pieces of 8192 bytes by using the MIN() macro, but ends up passing the negative chunk length to retr.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. The attacker can corrupt malloc metadata after the allocated buffer.

Other sources

The retr.c:fdreadbody() function is called when processing OK responses. 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 read the chunk in pieces of 8192 bytes by using the MIN() macro, but ends up passing the negative chunk length to retr.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. The attacker can corrupt malloc metadata after the allocated buffer.

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:09 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-13090?

The severity of CVE-2017-13090 is classified as moderate, as it can lead to improper parsing of chunked responses.

2

How do I fix CVE-2017-13090?

To fix CVE-2017-13090, upgrade to GNU Wget version 1.19.2 or later.

3

Which software versions are affected by CVE-2017-13090?

CVE-2017-13090 affects GNU Wget versions prior to 1.19.2, and specific Debian releases including Debian 8.0 and 9.0.

4

What type of vulnerability is CVE-2017-13090?

CVE-2017-13090 is a vulnerability related to improper validation of chunked HTTP response lengths.

5

Can CVE-2017-13090 be exploited remotely?

Yes, CVE-2017-13090 can potentially be exploited remotely if an attacker sends malicious chunked responses.

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