Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2017-13089 EUVD-2017-4607GHSA-3737-prh2-4m4p

GNU Wget: stack overflow in HTTP protocol handling

Published Oct 27, 2017 · Updated Sep 17, 2024 · Assigned by certcc

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.

Affected products

VendorProductAffectedFixed
GNU Project Wget prior to 1.19.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 wget 1.19.2-1 —
Debian 13 wget 1.19.2-1 —
Debian 12 wget 1.19.2-1 —
Debian 9 wget 1.18-5+deb9u1 DSA-4008-1
Debian 8 wget 1.16-1+deb8u4 DSA-4008-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 7 wget 1.13.4-3+deb7u5 DLA-1149-1
ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS wget 1.17.1-1ubuntu1.3 USN-3464-1
Ubuntu 14.04 LTS wget 1.15-1ubuntu1.14.04.3 USN-3464-1
ReleasePackageFixed inAdvisory
RHEL 7 wget 1.14-15.el7_4.1 RHSA-2017:3075
ReleasePackageFixed inAdvisory
SLES 12 SP3 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
SLES 12 SP2 wget 1.14-21.3.1 SUSE-SU-2017:2871-2, SUSE-SU-2017:2871-1
SLES 12 SP1 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
SLES 12 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 12 SP3 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
SLES for SAP 12 SP2 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
SLES for SAP 12 SP1 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
SUSE OpenStack Cloud 6 wget 1.14-21.3.1 SUSE-SU-2017:2871-2
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed wget 1.21.1-2.2 openSUSE-SU-2024:11510-1
ReleasePackageFixed inAdvisory
Alpine v3.5 wget 1.18-r3 —
Alpine v3.4 wget 1.18-r2 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 7 wget 1.14-15.el7_4.1 ELSA-2017-3075

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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 8

References