# CVE-2026-32738: Strukturag libheif denial of service via integer underflow in stsc box

Source: https://junglewise.ai/threats/cve-2026-32738-strukturag-libheif-denial-of-service-via-integer-underflow-in  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-19. Updated: 2026-05-19  
License: CC BY 4.0 with a link back

CVE-2026-32738 · Severity: medium · CVSS 6.5 · Published 2026-05-19

libheif is a software library used by many applications to open and process HEIF and AVIF image files. A vulnerability in this library allows an attacker to crash any application that attempts to process a specially crafted image file. This results in a denial-of-service, potentially disrupting services or applications that handle user-uploaded images or media.

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-32738 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-32738 being exploited in the wild.

**How severe is CVE-2026-32738?** Medium severity, with a CVSS score of 6.5, published 19 May 2026.

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

**Is there a fix for CVE-2026-32738?** A patch was published on 2026-05-19: Fixed in version 1.22.0 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-32738 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-32738?** 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

A vulnerability exists in libheif versions 1.21.2 and below due to missing validation of the 'samples_per_chunk' field in the 'stsc' (sample-to-chunk) box. When this value is set to zero, it triggers an unsigned integer underflow in the Chunk constructor (m_last_sample = 0 + 0 - 1 = UINT32_MAX). This causes all samples to be mapped to an empty chunk. When an application attempts to access the first frame, the library performs an out-of-bounds read on an empty std::vector in 'Chunk::get_data_extent_for_sample()', resulting in a segmentation fault (SEGV). The issue is fixed in version 1.22.0.

## Affected products

- strukturag libheif <= 1.21.2

## Timeline

- 2026-05-19: advisory: GitHub Advisory GHSA-7f2h-cmpf-v9ww published
- 2026-05-19: disclosed: CVE-2026-32738 published to NVD
- 2026-05-19: patched: Fixed in version 1.22.0

## References

- [https://github.com/strukturag/libheif/security/advisories/GHSA-7f2h-cmpf-v9ww](https://github.com/strukturag/libheif/security/advisories/GHSA-7f2h-cmpf-v9ww)

## 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 integer overflow in region.cc mask parsing](https://junglewise.ai/threats/cve-2026-47714-strukturag-libheif-integer-overflow-in-region-cc-mask-parsing)
- [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)
