Out-of-bounds Read

Affecting apk-tools package, versions <2.10.7-r0

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

NVD Description

Note: Versions mentioned in the description apply to the upstream apk-tools package. See Remediation section below for Alpine:3.11 relevant versions.

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.

Remediation

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

References

CVSS Score

9.1
critical severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    None
  • Availability
    High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVE
CVE-2021-36159
CWE
CWE-125
Snyk ID
SNYK-ALPINE311-APKTOOLS-1534687
Disclosed
03 Aug, 2021
Published
27 Jul, 2021