CVE-2021-36159

CRITICALCVSS 9.1/10EPSS 2.64%

Last modified

CVE-2021-36159 is a critical-severity vulnerability rated 9.1/10 on the CVSS scale. 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. EPSS estimates a 2.64% chance of exploitation in the next 30 days.

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.

Metrics

CVSS 3.1
9.1/10

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

EPSS Probability
2.64%

83.6th percentile

Probability of exploitation in the next 30 days. Learn more

Weakness Enumeration

Affected Software

VendorProductVersions
FreebsdLibfetch< 2021-07-26

References

Timeline

Published
Last Modified
Status
Modified

Frequently Asked Questions

What is CVE-2021-36159?
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.
How severe is CVE-2021-36159?
CVE-2021-36159 has a CVSS score of 9.1/10 (CRITICAL severity). The EPSS model estimates a 2.64% probability of exploitation in the next 30 days.
How do I fix CVE-2021-36159?
Check the vendor references and advisories linked above for patched versions and mitigation guidance. You can also run a Strix scan to test if your systems are affected.

Are you affected by CVE-2021-36159?

Run a free Strix scan to check your systems for this vulnerability.

Scan your code now

Source: NVD / NIST