CVE-2026-142496: libheif 1.16.0 before 1.23.4 Uncontrolled Recursion in Reference Cycle Check
libheif 1.16.0 before 1.23.4 contains an uncontrolled recursion vulnerability in HeifFile::checkforrefcyclerecursion() that allows attackers to crash the process via crafted files. Attackers can supply a HEIF or AVIF file under 1 MB with a long linear chain of 'dimg' references to exhaust the stack during heifcontextreadfromfile(), causing a segmentation fault.
Affected Software
Event History
Frequently Asked Questions
Which deployments are exposed?
Applications using libheif versions 1.16.0 through versions earlier than 1.23.4 are affected when they process attacker-supplied HEIF or AVIF files.
What does an attacker need to trigger the issue?
The attacker needs to provide a crafted HEIF or AVIF file containing a long linear chain of dimg references and have the application parse it through heif_context_read_from_file(). The malicious file can be smaller than 1 MB.
How can I determine whether an installation is affected?
Check the bundled or installed libheif version. Versions starting at 1.16.0 and before 1.23.4 should be treated as affected; version 1.23.4 is outside the stated affected range.
What is the operational impact of successful exploitation?
Processing the crafted file can exhaust the process stack and cause a segmentation fault, resulting in a process crash and denial of service.