Out-of-bounds Read Affecting apk-tools package, versions <2.10.7-r0


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.47% (77th 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-ALPINE310-APKTOOLS-1534688
  • published27 Jul 2021
  • disclosed3 Aug 2021

Introduced: 27 Jul 2021

CVE-2021-36159  (opens in a new tab)
CWE-125  (opens in a new tab)

How to fix?

Upgrade Alpine:3.10 apk-tools to version 2.10.7-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream apk-tools package and not the apk-tools package as distributed by Alpine. See How to fix? for Alpine:3.10 relevant fixed versions and status.

libfetch before 2021-07-26, as used in apk-tools, xbps, and other products, mishandles numeric strings for the FTP and HTTP protocols. The FTP passive mode implementation allows an out-of-bounds read because strtol is used to parse the relevant numbers into address bytes. It does not check if the line ends prematurely. If it does, the for-loop condition checks for the '\0' terminator one byte too late.

CVSS Scores

version 3.1