Vulnerability · Published Aug 3, 2021 · Assigned by mitre

CVE-2021-36159

Critical 9.1

In plain English

A critical-severity security flaw in the apk-tools package (Alpine). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.6% (higher than 86% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)9.1Critical
Exploit odds (30 days)2.6%top 14.4% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20apk-tools2.12.6-r0ALPINE-CVE-2021-36159
Alpine:v3.21apk-tools2.12.6-r0ALPINE-CVE-2021-36159
Alpine:v3.22apk-tools2.12.6-r0ALPINE-CVE-2021-36159
Alpine:v3.23apk-tools2.12.6-r0ALPINE-CVE-2021-36159
Alpine:v3.24apk-tools2.12.6-r0ALPINE-CVE-2021-36159

Affected products (as reported)

VendorProductVersions
n/a n/a n/a

References