CVE-2021-36159 Memory corruption in n/a
An out-of-bounds read in libfetch's FTP passive mode parsing allows attackers to cause denial of service or disclose memory contents.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-36159?
CVE-2021-36159 is a critical memory corruption vulnerability in n/a, published on 3 Aug 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
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.
Weakness: CWE-125
Which versions are affected by CVE-2021-36159?
It affects 1 product.
Products include Freebsd Libfetch.
How do I fix CVE-2021-36159?
Upgrade to a fixed version.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2021-36159 being exploited?
There is no known exploitation of CVE-2021-36159 in the wild and no public exploit code.
Sources
Also known as ALPINE-CVE-2021-36159, CLEANSTART-2024-QY49734, GHSA-cqp5-89fm-vp89.