Exploit database

Vulnerability

CVE-2017-13089

GNU Wget: stack overflow in HTTP protocol handling

Vulnerability details

Score
8.8
Severity
high

CVSS 3.0 · certcc

Vector string

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

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.

CVE Program

Exploit source choices

2 sources
mzeyong/cve-2017-13089
GH-852dff9f0b1e4d2e3af0443d483d19f1GitHubUnofficial GitHub sourcePreferred

CVE-2017-13089

2017-11-151 file · 55 stars
r1b/cve-2017-13089
GH-287fe5080db1242385d17c16f6955f9bGitHubUnofficial GitHub source

PoC for wget v1.19.1

2017-10-274 files · 52 stars