CVE-2017-13089
GNU Wget: stack overflow in HTTP protocol handling
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
8.8
GNU Wget: stack overflow in HTTP protocol handling
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.
- Record
CVE-2017-13089- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-121
- Updated
- 2026-11-02
EUVDEUVD-2017-4607
8.8
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.
- Record
EUVD-2017-4607- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3737-prh2-4m4p
8.8
The http.c:skip_short_body() function is called in some circumstances, such as when processing...
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.
- Record
GHSA-3737-prh2-4m4p- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Weakness
- CWE-119, CWE-121
- Updated
- 2026-11-02
NVD
8.8
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.
- Record
CVE-2017-13089- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 9.3 High
AV:N/AC:M/Au:N/C:C/I:C/A:C - Weakness
- CWE-121, CWE-119
- Updated
- 2026-11-02
OSVALPINE-CVE-2017-13089
8.8
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.
- Record
ALPINE-CVE-2017-13089- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
8.8
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.
- Record
CVE-2017-13089- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 8 moreShow less
OSVDEBIAN-CVE-2017-13089
8.8
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.
- Record
DEBIAN-CVE-2017-13089- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2017:3075
7.8
Red Hat Security Advisory: wget security update
- Record
RHSA-2017:3075- CVSS 3.0
- 7.8 High
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2017-13089
8.8
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.
- Record
UBUNTU-CVE-2017-13089- CVSS 3.0
- 8.8 High
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVMGASA-2017-0396 No score
Updated wget packages fix security vulnerabilities
The http.c:skip_short_body() 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: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 (CVE-2017-13089).
The retr.c:fd_read_body() 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: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. The attacker can corrupt malloc metadata after the allocated buffer (CVE-2017-13090).
- Record
MGASA-2017-0396- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11510-1 No score
wget-1.21.1-2.2 on GA media
These are all security issues fixed in the wget-1.21.1-2.2 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11510-1- Updated
- 2026-11-02
OSVSUSE-SU-2017:2871-1 No score
Security update for wget
This update for wget fixes the following security issues:
- CVE-2017-13089,CVE-2017-13090: Missing checks for negative remaining_chunk_size in skip_short_body and fd_read_body could cause stack buffer overflows, which could have been exploited by malicious servers. (bsc#1064715,bsc#1064716)
- Record
SUSE-SU-2017:2871-1- Updated
- 2026-11-02
OSVSUSE-SU-2017:2871-2 No score
Security update for wget
This update for wget fixes the following security issues:
- CVE-2017-13089,CVE-2017-13090: Missing checks for negative remaining_chunk_size in skip_short_body and fd_read_body could cause stack buffer overflows, which could have been exploited by malicious servers. (bsc#1064715,bsc#1064716)
- Record
SUSE-SU-2017:2871-2- Updated
- 2026-11-02
OSVUSN-3464-1 No score
wget vulnerabilities
Antti Levomäki, Christian Jalio, and Joonas Pihlaja discovered that Wget incorrectly handled certain HTTP responses. A remote attacker could use this issue to cause Wget to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2017-13089, CVE-2017-13090)
Dawid Golunski discovered that Wget incorrectly handled recursive or mirroring mode. A remote attacker could possibly use this issue to bypass intended access list restrictions. (CVE-2016-7098)
Orange Tsai discovered that Wget incorrectly handled CRLF sequences in HTTP headers. A remote attacker could possibly use this issue to inject arbitrary HTTP headers. (CVE-2017-6508)
- Record
USN-3464-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
wgetAlpine:v3.4 |
before 1.18-r2 | 1.18-r2 |
wgetAlpine:v3.5 |
before 1.18-r3 | 1.18-r3 |
wgetDebian:12 |
before 1.19.2-1 | 1.19.2-1 |
wgetDebian:13 |
before 1.19.2-1 | 1.19.2-1 |
wgetDebian:14 |
before 1.19.2-1 | 1.19.2-1 |
wgetDebian:7 |
before 1.13.4-3+deb7u5, plus listed versions 1.13.4-31.13.4-3+deb7u11.13.4-3+deb7u21.13.4-3+deb7u31.13.4-3+deb7u4 |
1.13.4-3+deb7u5 |
wgetDebian:8 |
before 1.16-1+deb8u4, plus listed versions 1.16-11.16-1+deb8u11.16-1+deb8u2 |
1.16-1+deb8u4 |
wgetDebian:9 |
before 1.18-5+deb9u1, plus listed versions 1.18-5 |
1.18-5+deb9u1 |
wgetMageia:5 |
before 1.15-5.3.mga5 | 1.15-5.3.mga5 |
wgetMageia:6 |
before 1.19.2-1.mga6 | 1.19.2-1.mga6 |
Show 22 moreShow less
| Package | Affected | Fixed |
|---|---|---|
wgetRed Hat:enterprise_linux:7::client |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wget-debuginfoRed Hat:enterprise_linux:7::client |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wgetRed Hat:enterprise_linux:7::computenode |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wget-debuginfoRed Hat:enterprise_linux:7::computenode |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wgetRed Hat:enterprise_linux:7::server |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wget-debuginfoRed Hat:enterprise_linux:7::server |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wgetRed Hat:enterprise_linux:7::workstation |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wget-debuginfoRed Hat:enterprise_linux:7::workstation |
before 0:1.14-15.el7_4.1 | 0:1.14-15.el7_4.1 |
wgetSUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:OpenStack Cloud 6 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Desktop 12 SP2 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Desktop 12 SP3 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server for SAP Applications 12 SP1 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server 12-LTSS |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server 12 SP1-LTSS |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server 12 SP2 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server for SAP Applications 12 SP2 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server 12 SP3 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetSUSE:Linux Enterprise Server for SAP Applications 12 SP3 |
before 1.14-21.3.1 | 1.14-21.3.1 |
wgetUbuntu:14.04:LTS |
before 1.15-1ubuntu1.14.04.3, plus listed versions 1.14-2ubuntu11.14-5ubuntu11.15-1ubuntu11.15-1ubuntu1.14.04.11.15-1ubuntu1.14.04.2 |
1.15-1ubuntu1.14.04.3 |
wgetUbuntu:16.04:LTS |
before 1.17.1-1ubuntu1.3, plus listed versions 1.16.1-1ubuntu11.17.1-1ubuntu11.17.1-1ubuntu1.11.17.1-1ubuntu1.2 |
1.17.1-1ubuntu1.3 |
wgetopenSUSE:Tumbleweed |
before 1.21.1-2.2 | 1.21.1-2.2 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | mzeyong/CVE-2017-13089 | 2017-11-15 |
| PoC in GitHub | r1b/CVE-2017-13089 | 2017-10-27 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2017-13089 is a high vulnerability (CVSS 8.8) in Gnu Wget, published October 26, 2017. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 79.9%, the 99th percentile. Fixed in wget 1.18-r2.
References
viestintavirasto.fi/en/cybersecurity/vulnerabilities/2017/haavoittuvuus-2017-037.html
security.gentoo.org/glsa/201711-06
debian.org/security/2017/dsa-4008
synology.com/support/security/Synology_SA_17_62_Wget
git.savannah.gnu.org/cgit/wget.git/commit?id=d892291fb8ace4c3b734ea5125770989c215df3f
securityfocus.com/bid/101592
Show 35 moreShow less
github.com/r1b/CVE-2017-13089
securitytracker.com/id/1039661
access.redhat.com/errata/RHSA-2017:3075
nvd.nist.gov/vuln/detail/CVE-2017-13089
github.com/advisories/GHSA-3737-prh2-4m4p
security.alpinelinux.org/vuln/CVE-2017-13089
security-tracker.debian.org/tracker/CVE-2017-13089
advisories.mageia.org/MGASA-2017-0396.html
bugs.mageia.org/show_bug.cgi?id=21947
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=1505444
bugzilla.redhat.com/show_bug.cgi?id=1505445
security.access.redhat.com/data/csaf/v2/advisories/2017/rhsa-2017_3075.json
access.redhat.com/security/cve/CVE-2017-13089
cve.org/CVERecord?id=CVE-2017-13089
access.redhat.com/security/cve/CVE-2017-13090
cve.org/CVERecord?id=CVE-2017-13090
nvd.nist.gov/vuln/detail/CVE-2017-13090
suse.com/support/update/announcement/2017/suse-su-20172871-1
bugzilla.suse.com/1064715
bugzilla.suse.com/1064716
suse.com/security/cve/CVE-2017-13089
suse.com/security/cve/CVE-2017-13090
suse.com/support/update/announcement/2017/suse-su-20172871-2
ubuntu.com/security/CVE-2017-13089
ubuntu.com/security/notices/USN-3464-1
ubuntu.com/security/notices/USN-3464-2
ubuntu.com/security/CVE-2016-7098
ubuntu.com/security/CVE-2017-6508
ubuntu.com/security/CVE-2017-13090
suse.com/security/cve/CVE-2006-6719
suse.com/security/cve/CVE-2017-6508
suse.com/security/cve/CVE-2018-0494
suse.com/security/cve/CVE-2018-20483
suse.com/security/cve/CVE-2019-5953