Every CVE Search/ Get API key

CVE-2017-13089

GNU Wget: stack overflow in HTTP protocol handling

8.8 HighPublic exploitFix available

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

79.9%Up 71.2 points since Apr 14, 2021
90%50%10%1%

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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
9.3 HighAV: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
wget
Alpine:v3.4
before 1.18-r2
1.18-r2
wget
Alpine:v3.5
before 1.18-r3
1.18-r3
wget
Debian:12
before 1.19.2-1
1.19.2-1
wget
Debian:13
before 1.19.2-1
1.19.2-1
wget
Debian:14
before 1.19.2-1
1.19.2-1
wget
Debian:7
From an advisory covering 2 CVEs
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
wget
Debian:8
From an advisory covering 2 CVEs
before 1.16-1+deb8u4, plus listed versions
1.16-11.16-1+deb8u11.16-1+deb8u2
1.16-1+deb8u4
wget
Debian:9
From an advisory covering 2 CVEs
before 1.18-5+deb9u1, plus listed versions
1.18-5
1.18-5+deb9u1
wget
Mageia:5
From an advisory covering 2 CVEs
before 1.15-5.3.mga5
1.15-5.3.mga5
wget
Mageia:6
From an advisory covering 2 CVEs
before 1.19.2-1.mga6
1.19.2-1.mga6
Show 24 moreShow less
Affected packages
PackageAffectedFixed
wget
Red Hat:enterprise_linux:7::client
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget-debuginfo
Red Hat:enterprise_linux:7::client
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget
Red Hat:enterprise_linux:7::computenode
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget-debuginfo
Red Hat:enterprise_linux:7::computenode
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget
Red Hat:enterprise_linux:7::server
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget-debuginfo
Red Hat:enterprise_linux:7::server
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget
Red Hat:enterprise_linux:7::workstation
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget-debuginfo
Red Hat:enterprise_linux:7::workstation
From an advisory covering 2 CVEs
before 0:1.14-15.el7_4.1
0:1.14-15.el7_4.1
wget
SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:OpenStack Cloud 6
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Desktop 12 SP2
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Desktop 12 SP3
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server for SAP Applications 12 SP1
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server 12-LTSS
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server 12 SP1-LTSS
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server 12 SP2
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server for SAP Applications 12 SP2
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server 12 SP3
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
SUSE:Linux Enterprise Server for SAP Applications 12 SP3
From an advisory covering 2 CVEs
before 1.14-21.3.1
1.14-21.3.1
wget
Ubuntu: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
wget
Ubuntu: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
wget
Ubuntu:14.04:LTS
From an advisory covering 4 CVEs
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
wget
Ubuntu:16.04:LTS
From an advisory covering 4 CVEs
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
wget
openSUSE:Tumbleweed
From an advisory covering 7 CVEs
before 1.21.1-2.2
1.21.1-2.2

Public exploits

Links only. Every CVE stores no exploit code.

Public exploits
SourceLinkDate
PoC in GitHubr1b/CVE-2017-130892017-10-27
PoC in GitHubmzeyong/CVE-2017-130892017-11-15

History

History
RecordedChangedSources
affected, exploits, facts
aliasesEUVD
first indexedCVE 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

Show 35 moreShow less
MoveEnter Open