{"id":"CVE-2021-36159","aliases":["CVE-2021-36159"],"related":[],"kind":"vulnerability","state":"published","title":"libfetch before 2021-07-26, as used in apk-tools, xbps, and other products, mishandles numeric strings for the FTP and HTTP protocols.","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"libfetch versiones anteriores al 26-07-2021, como se usa en apk-tools, xbps, y otros productos, maneja inapropiadamente las cadenas numéricas para los protocolos FTP y HTTP. La implementación del modo pasivo de FTP permite una lectura fuera de límites porque strtol se usa para analizar los números relevantes en bytes de dirección. No comprueba si la línea termina prematuramente. Si lo hace, la condición para bucle comprueba el terminador \"\\0\" un byte demasiado tarde","source":"nvd"}],"published":"2021-08-03T13:22:54.000Z","modified":"2026-06-17T03:58:26.080Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","score":9.1,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:P","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"status":"affected","fixed":"2021-07-26"}],"vendor":"freebsd","product":"libfetch","cpe":"cpe:2.3:a:freebsd:libfetch:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10749","tags":["exploit","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/freebsd/freebsd-src/commits/main/lib/libfetch","tags":["patch","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cdev.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cusers.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cusers.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cdev.kafka.apache.org%3E","tags":["mailing-list","x-refsource-mlist","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-36159","url":"https://www.cve.org/CVERecord?id=CVE-2021-36159","licence":"CVE Terms of Use","modified":"2024-08-04T00:47:43.816Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-36159","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-36159","licence":"Public domain","modified":"2026-06-17T03:58:26.080Z"}],"updatedAt":"2026-11-25T22:58:02.944Z","epss":{"score":0.02637,"percentile":0.85982,"date":"2026-12-01T12:00:22.000Z"}}