CVE-2026-142502: libheif 1.16.0 before 1.23.6 Out-of-Bounds Read via Sharp-YUV Conversion
libheif 1.16.0 before 1.23.6 contains an out-of-bounds read vulnerability in OpAnyRGBtoYCbCr420Sharp::convertcolorspace() that passes unchecked 10-bit or 12-bit RGB samples to SharpYuvConvert(). Attackers can supply a crafted HEIF file producing samples above the declared bit depth so libsharpyuv gamma table lookups read out of bounds, crashing the process or leaking memory into output pixels.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
libheifto a version that resolves this vulnerability.Fixed in 1.23.6
Event History
Frequently Asked Questions
Which versions are affected?
libheif versions from 1.16.0 before 1.23.6 are affected. Version 1.23.6 is identified as the release containing the fix.
What does an attacker need to exploit this issue?
An attacker needs to provide a crafted HEIF file that produces 10-bit or 12-bit RGB samples above the declared bit depth during Sharp-YUV color conversion. The vulnerable conversion passes those samples unchecked to libsharpyuv.
What impact should operators expect?
The out-of-bounds gamma-table lookup can crash the process. It may also leak memory contents into output pixels.