USN-8774-1: libheif vulnerabilities
Ubuntu patches libheif image-parsing flaws allowing denial of service or arbitrary code execution (CVE-2026-62291, CVE-2026-62377).
Heap out-of-bounds write/read in libheif image sequence decode and re-encode (≤ 1.23.0)
libheif, a widely used open-source HEIF/AVIF decoder and encoder, fails to validate that an auxiliary alpha plane's dimensions match the main frame when decoding image sequences: Track_Visual::decode_next_image_sample() passes an inconsistent image downstream, and during re-encoding unc_encoder_component_interleave::encode_tile() allocates its buffer using the primary dimensions while copying each component using its actual plane dimensions, causing an attacker-controlled heap out-of-bounds write (and, with the inverse mismatch, an out-of-bounds read). The flaw is triggered by decoding a crafted image sequence (a 2x2 primary plane with a 256x256 alpha plane is a demonstrated trigger) in a normal decode-and-re-encode workflow, so an attacker gains heap corruption that can crash the application (DoS) and potentially enable memory-corruption exploitation with limited confidentiality, integrity, and availability impact per the CVSS scoring. Any application or system that decodes untrusted HEIF/AVIF image sequences with libheif 1.23.0 or earlier is affected, including Linux distributions that ship the library, as confirmed by Ubuntu security notice USN-8774-1. No public proof-of-concept is known, the flaw is not in CISA KEV, and EPSS estimates only a 0.1% probability of exploitation within 30 days, so no exploitation is currently known.
What to do: Upgrade libheif to version 1.23.1, or apply the distro update provided in Ubuntu USN-8774-1 (and equivalent updates in other distributions that package libheif). Until patched, avoid processing untrusted HEIF/AVIF image sequences in tools that decode and re-encode/transcode images with libheif (viewers, thumbnailers, transcoders, ImageMagick/vips-style pipelines that link it). Inventory systems and applications for linked libheif builds to confirm they receive the fixed version.
| Product | Affected |
|---|---|
| libheif (strukturag) libheif | 1.23.0 and earlier (fixed in 1.23.1) |
| Canonical Ubuntu libheif packages | supported Ubuntu releases shipping libheif 1.23.0 or earlier (fixes issued in USN-8774-1) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
libheif is a HEIF and AVIF file format decoder and encoder. In 1.23.0 and earlier, a crafted image sequence with a 2x2 primary plane and a 256x256 auxiliary alpha plane can cause attacker-controlled heap corruption during a normal decode and re-encode workflow. Track_Visual::decode_next_image_sample() calls transfer_channel_from_image_as() without checking that the auxiliary alpha dimensions match the main frame. The resulting inconsistent image reaches heif_track_decode_next_image() and then heif_context_encode_image(). In unc_encoder::encode(), unc_encoder_component_interleave::encode_tile() sizes its buffer with compute_tile_data_size_bytes() using the primary dimensions but copies each component using its actual plane dimensions. The oversized alpha plane is therefore copied beyond the allocation, causing an out-of-bounds write; the inverse size mismatch can also produce an out-of-bounds read. This issue is fixed in version 1.23.1.
Ubuntu patches libheif image-parsing flaws allowing denial of service or arbitrary code execution (CVE-2026-62291, CVE-2026-62377).
Today 1.3K readers · 2.1K views · 1.6K reads · all time 160K views