CVE-2026-5121: Libarchive: libarchive: arbitrary code execution via integer overflow in iso9660 image processing
A flaw was found in libarchive. On 32-bit systems, an integer overflow vulnerability exists in the zisofs block pointer allocation logic. A remote attacker can exploit this by providing a specially crafted ISO9660 image, which can lead to a heap buffer overflow. This could potentially allow for arbitrary code execution on the affected system.
Other sources
Libarchive: libarchive: arbitrary code execution via integer overflow in iso9660 image processing
— Microsoft
On 32-bit systems, an integer overflow in the zisofs block pointer allocation logic (archivereadsupportformatiso9660.c, line 1537) wraps the allocation size to zero. malloc(0) returns a ~16-byte buffer, but the code records the un-wrapped size (~4 GB) and proceeds to memcpy() attacker-controlled ISO data into the tiny buffer - a heap buffer overflow WRITE. On 64-bit systems the overflow doesn't wrap and malloc fails safely. Shares root cause with vulnerability #2 (unvalidated pzlog2bs).Requirements to exploit: The target must be a 32-bit system processing a crafted ISO9660 image via libarchive. The attacker needs to deliver the ISO to an application that extracts or reads its contents. Exploitation to RCE would require heap grooming specific to the target allocator/platform.
— Red Hat
Affected Software
Remediation
Patch Available
Event History
Frequently Asked Questions
What is the severity of CVE-2026-5121?
CVE-2026-5121 has a high severity rating due to its potential for arbitrary code execution.
How do I fix CVE-2026-5121?
To fix CVE-2026-5121, upgrade to the latest version of libarchive that addresses this integer overflow vulnerability.
Who is impacted by CVE-2026-5121?
CVE-2026-5121 impacts users of libarchive, particularly those running on 32-bit systems.
How does CVE-2026-5121 exploit integer overflow?
CVE-2026-5121 exploits integer overflow in the zisofs block pointer allocation logic during iso9660 image processing.
Can CVE-2026-5121 be exploited remotely?
Yes, CVE-2026-5121 can be exploited remotely by an attacker providing specially crafted input.