Heap-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
18.87% (97th 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-4742255
  • published26 Jul 2021
  • disclosed26 Oct 2017

Introduced: 26 Oct 2017

CVE-2017-13090  (opens in a new tab)
CWE-122  (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 retr.c:fd_read_body() function is called when processing OK responses. 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 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.