Stack-based Buffer Overflow Affecting wget package, versions <0:1.14-15.el7_4.1


Severity

Recommended
0.0
high
0
10

Based on Red Hat Enterprise Linux security rating.

Threat Intelligence

EPSS
37.35% (98th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RHEL7-WGET-4750678
  • published26 Jul 2021
  • disclosed26 Oct 2017

Introduced: 26 Oct 2017

CVE-2017-13089  (opens in a new tab)
CWE-121  (opens in a new tab)

How to fix?

Upgrade RHEL:7 wget to version 0:1.14-15.el7_4.1 or higher.
This issue was patched in RHSA-2017:3075.

NVD Description

Note: Versions mentioned in the description apply only to the upstream wget package and not the wget package as distributed by RHEL. See How to fix? for RHEL:7 relevant fixed versions and status.

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.