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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | apk-tools | 2.12.6-r0 | ALPINE-CVE-2021-36159 |
| Alpine:v3.21 | apk-tools | 2.12.6-r0 | ALPINE-CVE-2021-36159 |
| Alpine:v3.22 | apk-tools | 2.12.6-r0 | ALPINE-CVE-2021-36159 |
| Alpine:v3.23 | apk-tools | 2.12.6-r0 | ALPINE-CVE-2021-36159 |
| Alpine:v3.24 | apk-tools | 2.12.6-r0 | ALPINE-CVE-2021-36159 |
Affected products (as reported)
References
- https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10749 x_refsource_MISC
- https://github.com/freebsd/freebsd-src/commits/main/lib/libfetch x_refsource_MISC
- [kafka-dev] 20210831 Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image mailing-list, x_refsource_MLIST
- [kafka-users] 20210831 Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image mailing-list, x_refsource_MLIST
- [kafka-users] 20210901 Re: [EXTERNAL] Re: Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image mailing-list, x_refsource_MLIST
- [kafka-dev] 20210901 Re: [EXTERNAL] Re: Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image mailing-list, x_refsource_MLIST