Description
libheif 1.16.0 before 1.23.4 contains an uncontrolled recursion vulnerability in HeifFile::check_for_ref_cycle_recursion() that allows attackers to crash the process via crafted files. Attackers can supply a HEIF or AVIF file under 1 MB with a long linear chain of 'dimg' references to exhaust the stack during heif_context_read_from_file(), causing a segmentation fault.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| strukturag | libheif | 1.16.0 – < 1.23.4 | 1.23.4 |
References
- GitHub Security Advisory (GHSA-xrp2-63fq-jm8q) vendor-advisory
- https://github.com/strukturag/libheif/commit/b1e4d72a492a2d7be6d1c29153660cb91e570556 patch
- https://github.com/strukturag/libheif/commit/7538a4f3f13a26a948f083610016e527f9b12fb5 patch
- libheif v1.23.4 Release Notes release-notes
- https://github.com/strukturag/libheif/blob/v1.23.3/libheif/file.cc#L661-L694 technical-description
- VulnCheck Advisory: libheif 1.16.0 before 1.23.4 Uncontrolled Recursion in Reference Cycle Check third-party-advisory