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


0.0
critical

Snyk CVSS

    Attack Complexity Low
    Confidentiality High
    Availability High

    Threat Intelligence

    EPSS 0.36% (72nd percentile)
Expand this section
NVD
9.1 critical

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 ID SNYK-ALPINE310-APKTOOLS-1534688
  • published 27 Jul 2021
  • disclosed 3 Aug 2021

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.