Libfetch · Libfetch · CVE-2021-36159
**Name of the Vulnerable Software and Affected Versions**
libfetch versions prior to 2021-07-26
**Description**
The issue concerns the mishandling of numeric strings for the FTP and HTTP protocols. Specifically, the FTP passive mode implementation allows an out-of-bounds read due to the use of strtol to parse numbers into address bytes without checking for premature line endings. This results in the for-loop condition checking for the '0' terminator one byte too late.
**Recommendations**
For libfetch versions prior to 2021-07-26, consider updating to a version released after 2021-07-26 to resolve the issue. As a temporary workaround, consider restricting the use of FTP passive mode until a patch is available.