libheif 1.20.0 before 1.23.6 contains a null pointer dereference vulnerability in Track_Visual::decode_next_image_sample() that allows attackers to crash the process via crafted HEIF image sequences. Attackers can map a later chunk in the 'stsc' box to a non-visual 'stsd' sample entry such as 'mp4a', causing heif_track_decode_next_image() to call through a null decoder pointer.
https://github.com/strukturag/libheif/security/advisories/GHSA-8p2c-9wv4-rx4p
https://github.com/strukturag/libheif/releases/tag/v1.23.6
https://github.com/strukturag/libheif/commit/2b87e150b3fce9d0b29c7d97423b38ce3d8239fc
https://github.com/strukturag/libheif/blob/v1.23.5/libheif/sequences/track_visual.cc#L205-L214