{"id":"ALPINE-CVE-2021-36159","details":"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.","modified":"2026-08-27T22:18:01.632663138Z","published":"2021-08-03T14:15:08.233Z","upstream":["CVE-2021-36159"],"references":[{"type":"ADVISORY","url":"https://security.alpinelinux.org/vuln/CVE-2021-36159"}],"affected":[{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.10","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.7-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.11","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.7-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.12","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.7-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.13","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.14","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.15","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.16","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.17","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.18","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.19","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.20","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.21","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.22","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.23","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}},{"package":{"name":"apk-tools","ecosystem":"Alpine:v3.24","purl":"pkg:apk/alpine/apk-tools?arch=source"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.12.6-r0"}]}],"ecosystem_specific":{},"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2021-36159.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H"}]}