# CVE-2026-47714: Strukturag libheif integer overflow in region.cc mask parsing

Source: https://junglewise.ai/threats/cve-2026-47714-strukturag-libheif-integer-overflow-in-region-cc-mask-parsing  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-21. Updated: 2026-07-21  
License: CC BY 4.0 with a link back

CVE-2026-47714 · Severity: medium · CVSS 6.1 · Published 2026-07-21

libheif is a software library used by many applications to process HEIF and AVIF image files. A flaw in how the library handles image masks allows a specially crafted image file to cause a memory error. If a user opens such a file, the application could crash or potentially leak sensitive information from its memory, though this typically requires the application to be configured to handle very high-resolution images.

Technologies: [struktur AG Libheif](https://junglewise.ai/threats/technologies/libheif). Vendors: [struktur AG](https://junglewise.ai/threats/vendors/struktur-ag).

## Quick answers

**Is CVE-2026-47714 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-47714 being exploited in the wild.

**How severe is CVE-2026-47714?** Medium severity, with a CVSS score of 6.1, published 21 July 2026.

**Which products and versions are affected?** struktur AG Libheif <= 1.21.2.

**Is there a fix for CVE-2026-47714?** A patch was published on 2026-07-21: Version 1.22.0 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-47714 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-47714?** Check whether you run struktur AG Libheif at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An integer overflow exists in `libheif/region.cc` within the inline mask parsing logic. The vulnerability occurs when calculating `additionalBytesRequired = width * height / 8`. Because `width` and `height` are 32-bit unsigned integers parsed directly from the file, their product can exceed `UINT32_MAX`, resulting in a truncated value and an undersized buffer allocation. When the mask data is subsequently processed as a full-sized bitmap, an out-of-bounds memory access occurs. Exploitation requires a user to open a crafted HEIF file and typically requires the application to have disabled or increased default security limits (`max_image_size_pixels`). This can result in a denial-of-service (crash) or potential information disclosure via OOB heap reads. The issue is fixed in version 1.22.0.

## Affected products

- strukturag libheif <= 1.21.2

## Timeline

- 2026-05-19: advisory: GitHub Security Advisory published
- 2026-07-21: disclosed: CVE published to NVD
- 2026-07-21: patched: Version 1.22.0 released

## References

- [https://github.com/strukturag/libheif/security/advisories/GHSA-h4wm-6wwf-qvhx](https://github.com/strukturag/libheif/security/advisories/GHSA-h4wm-6wwf-qvhx)

## Related threats

- [libheif decompression bomb via brotli/zlib metadata](https://junglewise.ai/threats/cve-2026-84384-libheif-is-a-heif-and-avif-file-format-decoder-and-encoder-from-1)
- [Strukturag libheif heap OOB read in ImageItem_Grid::decode_grid_tile](https://junglewise.ai/threats/cve-2026-48029-strukturag-libheif-heap-oob-read-in-imageitem-grid-decode-grid)
- [Strukturag libheif heap buffer over-read in SampleAuxInfoReader](https://junglewise.ai/threats/cve-2026-41071-strukturag-libheif-heap-buffer-over-read-in-sampleauxinforeader)
- [Strukturag libheif out-of-bounds read in SampleAuxInfoReader](https://junglewise.ai/threats/cve-2026-41069-strukturag-libheif-out-of-bounds-read-in-sampleauxinforeader)
- [libheif heap buffer over-read in HeifPixelImage::overlay](https://junglewise.ai/threats/cve-2026-32882-libheif-heap-buffer-over-read-in-heifpixelimage-overlay)
