Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted HEIF file to victim
-
DeliveryVictim opens file in libheif-based app
-
ExploitDecode yields lower bit depth than handle reports
-
ExecutionApp reads planes at wrong bit depth
-
ImpactOut-of-bounds read crashes app or leaks memory
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Input size validation
|
| Exploitation Conditions | Exploitation requires a crafted HEIF/HEIC file containing one of three triggers documented by the vendor: (1) a codec configuration box (hvcC/av1C) whose bitDepthLumaMinus8/bitDepthChromaMinus8 contradicts the actual bitstream, (2) a 'grid' image with tiles of differing bit depths (where a discarded error since libheif 1.19.0 lets a mismatched tile decode non-deterministically due to parallel tile decoding), or (3) an 'iovl' overlay whose first input image has more than 8 bits per sample (behavior present since 1.4.0 and reproducible even with vendor-written files). The out-of-bounds read does NOT occur inside libheif - it only occurs in a calling application that decodes without requesting a specific colorspace/chroma format AND reads decoded planes using the bit depth from heif_image_handle_get_luma_bits_per_pixel()/heif_image_handle_get_chroma_bits_per_pixel() instead of from the decoded image. Key limiting factors: the victim must open the attacker's file (UI:P/UI:R), the application must misuse the handle bit depth (applications that read bit depth from the decoded image via heif_image_get_bits_per_pixel_range(), or request a specific colorspace/chroma, are not affected - this is the documented workaround), and the grid variant is race-dependent and non-deterministic. Affected versions are <= 1.23.5; the complete fix is updating to 1.23.6. |
| Impact | This is a moderate-severity, defense-in-depth style library flaw rather than a drop-everything emergency. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:P, score 6.0) correctly signals that exploitation is network-delivered but gated by high attack complexity, a specific attack requirement (AT:P), and passive user interaction - the victim must open an attacker-supplied HEIF/HEIC file. Impact is memory disclosure (VC:L) or application crash/DoS (VA:H), with no integrity impact, which matches the CWE-1284/CWE-252 root cause (libheif reports a bit depth the decoded image contradicts; the out-of-bounds read occurs in the CALLING application, not inside libheif). No EPSS score and no CISA KEV status were provided in the input, and there is no indication of active exploitation. The GHSA includes a diagnostic proof-of-concept program, but it merely prints the mismatched bit depths - a public PoC reference exists; it is not verified as working exploit code against a real application. The vuln.today decision label is 'this_month' (not act_now/emergency), consistent with a patch-available, non-actively-exploited library bug. The most important caveat for prioritization: whether a given deployment is actually exploitable depends entirely on how the downstream application consumes libheif (see exploitation_conditions) - the library itself never reads or writes out of bounds, so the real-world risk is conditional on application code, not universal across all libheif users. |
| Exploit ScenarioDerived | An attacker crafts a HEIF/HEIC file whose hvcC or av1C configuration box advertises a higher bit depth (e.g. 10/16-bit) than the actual decoded bitstream (8-bit), or uses mixed-depth grid tiles or a >8-bit iovl overlay, and delivers it to a victim (email attachment, web upload, messaging app) who opens it in an image viewer built on libheif. If that application decodes without requesting a specific colorspace/chroma and reads the decoded planes using the handle-reported bit depth, it reads past the end of the plane buffer, crashing the process or leaking adjacent heap memory into the processed image. A diagnostic PoC in the vendor advisory demonstrates the bit-depth mismatch but is not a weaponized exploit. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
Bit depth mismatch in libheif through 1.23.5 lets a crafted HEIF/HEIC file make the decoded image's sample depth differ from the value heif_image_handle_get_luma_bits_per_pixel() or heif_image_handle_get_chroma_bits_per_pixel() returns, so a calling application that trusts the handle value and reads 16-bit samples from an 8-bit plane performs an out-of-bounds read - crashing the application or exposing memory contents through the processed picture. Three triggers are documented: an hvcC/av1C configuration box that contradicts the bitstream, a grid item whose tiles have differing bit depths (the mismatch is even non-deterministic because tiles decode in parallel), and an iovl overlay of an image with more than 8 bits per sample. The out-of-bounds access does not occur inside libheif itself and only materialises in applications that decode without requesting a specific colorspace/chroma format and take the depth from the handle; a public PoC reference exists in the vendor advisory, but it is not verified as working exploit code and no confirmed active exploitation is reported.
RemediationAI
Update libheif to 1.23.6, which adds the post-decode depth consistency check, enforces identical tile formats in grid items, and sizes the overlay canvas from its first input image; the release is at https://github.com/strukturag/libheif/releases/tag/v1.23.6 with the corresponding commits 770b0d8d7e1e57b0f4d2b8dc53ff3f82b712fbac (grid format checking and error propagation) and 64a5bba75ad64aa8c010b8ad61e32091025442b3, and details are in the advisory https://github.com/strukturag/libheif/security/advisories/GHSA-vv35-6hxg-95x8. Where the library cannot be rebuilt immediately, the vendor documents two application-side workarounds that eliminate the out-of-bounds read: read the bit depth from the decoded image with heif_image_get_bits_per_pixel_range() instead of from heif_image_handle_get_luma_bits_per_pixel()/heif_image_handle_get_chroma_bits_per_pixel(), or request a specific colorspace and chroma format when calling heif_decode_image() so the plane layout is known in advance - both require code changes in the consuming application rather than configuration, and the second constrains the output format the caller receives. Neither workaround fixes the underlying grid defect, in which a mismatched tile is silently omitted and the decoded grid is incomplete without an error being reported, so updating remains the only complete remedy.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
HEIF is an ISO-BMFF container format in which still images are stored as coded image items; libheif is the reference decoding library used by many image viewers, thumbnails and conversion tools. Each item carries a configuration box - hvcC for HEVC, av1C for AV1 - whose bitDepthLumaMinus8 and bitDepthChromaMinus8 fields advertise the sample depth, and libheif's heif_image_handle_get_luma_bits_per_pixel()/get_chroma_bits_per_pixel() read that advertised value. The actual decoded planes get their depth from the bitstream, and libheif validated only the decoded size against the file, not the depth, which is the improper validation of a specified quantity described by CWE-1284 (the GHSA also classifies it under CWE-252, unchecked return value). The grid path compounds this: ImageItem_Grid::decode_and_paste_tile_image() builds the canvas as a clone of the first decoded tile and calls HeifPixelImage::copy_image_to() for each tile, which rejects a tile of different depth, but since version 1.19.0 the returned error was discarded, so the tile was silently dropped, its area left zero, and decoding reported success - with the canvas depth depending on which parallel tile thread finished first. For iovl overlays, the handle has reported the bit depth of the first input image since version 1.4.0 while ImageItem_Overlay::decode_overlay_image() always composed onto an 8-bit canvas (and composed samples byte-by-byte, so such overlays decoded incorrectly anyway). The fix in 1.23.6 adds a post-decode check that the decoded image's depth matches the handle, makes check_tile_format() enforce identical colorspace, chroma format, component list, datatypes and bit depths across grid tiles (for both whole-grid and single-tile decoding), and sizes the overlay canvas from its first input image.
Know when Libheif gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
Remote crafted file but AC:H because exploitation needs contradictory boxes/mixed tiles and a vulnerable application API usage; UI:R to open the file; C:L memory disclosure, A:H crash/DoS, no integrity impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
libheif before 1.23.6 fails to verify that decoded images match the bit depth reported by the image handle, causing out-of-bounds reads in calling applications. Attackers can supply crafted HEIF files with contradicting hvcC or av1C boxes, mixed-depth grid tiles, or iovl overlays to crash applications or disclose memory.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::get_luma_bit
libheif v1.17.5 was discovered to contain a segmentation violation via the function find_exif_tag at /libheif/exif.cc. R
libheif v1.17.5 was discovered to contain a segmentation violation via the component /libheif/exif.cc. Rated high severi
libheif v1.17.5 was discovered to contain a segmentation violation via the function UncompressedImageCodec::decode_uncom
libheif 1.4.0 has a use-after-free in heif::HeifContext::Image::set_alpha_channel in heif_context.h because heif_context
In Libheif 1.17.6, insufficient checks in ImageOverlay::parse() decoding a heif file containing an overlay image with fo
libheif <= 1.17.6 contains a memory leak in the function JpegEncoder::Encode. Rated high severity (CVSS 7.5), this vulne
Out-of-bounds read in libheif's HEIF/HEIC overlay processing can disclose limited memory contents and crash affected app
A Segmentation fault caused by a floating point exception exists in libheif 1.15.1 using crafted heif images via the hei
Buffer Overflow vulnerability in libheif 1.19.7 allows a local attacker to execute arbitrary code via the SAO (Sample Ad
Heap-based buffer overflow in libheif before 1.23.2 allows remote attackers to corrupt memory and potentially achieve co
Heap buffer overflow write in libheif (versions ≤ 1.21.2) lets a crafted HEIF/AVIF file write 64 bytes of attacker-contr
EUVD-2026-141720
GHSA-r9x8-ww5h-wm7q
NVD
CVE.org
Exploit-DB