# CVE-2026-62291: libheif: Heap out of bounds write in libheif uncompressed encoder when writing images with mismatched auxiliary alpha dimensions

- Priority: **Routine**
- Reason: Not severe (CVSS 5.3, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-08-18 · Modified: 2026-08-21
- Aliases: UBUNTU-CVE-2026-62291, DEBIAN-CVE-2026-62291
- Record: https://cvemate.com/vulnerability/CVE-2026-62291 · JSON: https://cvemate.com/vulnerability/CVE-2026-62291/json

## Description

```text
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.
```

## Signals

- CVSS: 5.3 medium (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L
- EPSS: 0.222%, percentile 13.551%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- debian libheif (Debian): \< 1.23.1-1
- ubuntu libheif (Ubuntu): \< 1.17.6-1ubuntu4.8 \| \< 1.21.2-3ubuntu0.5
- strukturag libheif: \< 1.23.1

## References

- <https://github.com/strukturag/libheif/security/advisories/GHSA-xpw3-9rhw-482x>
- <https://github.com/strukturag/libheif/commit/ac5521ad50399885de96bb6a0733a5d2442740f9>
- <https://github.com/strukturag/libheif/releases/tag/v1.23.1>
- <https://ubuntu.com/security/CVE-2026-62291>
- <https://www.cve.org/CVERecord?id=CVE-2026-62291>
- <https://ubuntu.com/security/notices/USN-8683-1>
- <https://ubuntu.com/security/notices/USN-8774-1>
- <https://security-tracker.debian.org/tracker/CVE-2026-62291>

---

Data as of 2026-12-05T10:41:36.329Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
