CVE-2021-36159
publishedlibfetch: an out of boundary read while libfetch uses strtol to parse the relevant numbers into address bytes leads to information leak or crash
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| n/a | — | n/an/a | Affected | Not stated | mitre |
| Alpine Linux | edge | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.10 | apk-tools | Fixed | 2.10.7-r0 | Package fix record |
| Alpine Linux | v3.11 | apk-tools | Fixed | 2.10.7-r0 | Package fix record |
| Alpine Linux | v3.12 | apk-tools | Fixed | 2.10.7-r0 | Package fix record |
| Alpine Linux | v3.13 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.14 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.15 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
Show 9 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Alpine Linux | v3.16 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.17 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.18 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.19 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.20 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.21 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.22 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.23 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
| Alpine Linux | v3.24 | apk-tools | Fixed | 2.12.6-r0 | Package fix record |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
No normalized assessments.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| n/a | n/a | n/a (affected) | mitre · cna |
Weaknesses
1- n/a
References
6- https://github.com/freebsd/freebsd-src/commits/main/lib/libfetch
- https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10749
- [kafka-dev] 20210831 Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cdev.kafka.apache.org%3E
- [kafka-users] 20210831 Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cusers.kafka.apache.org%3E
- [kafka-dev] 20210901 Re: [EXTERNAL] Re: Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cdev.kafka.apache.org%3E
- [kafka-users] 20210901 Re: [EXTERNAL] Re: Security vulnerabilities in kafka:2.13-2.6.0/2.7.0 docker image https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cusers.kafka.apache.org%3E
Provider assertions
2mitre · cna
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- e1e7a7e83c445dce146dd4924c412e2f820e9fae038e33e0f9be858aa8c5cad3
- Ingested
- 23 Sep 2026, 07:55:06 UTC
- Source record
- Official CVE record