Microsoft HEIF Image Extensions Out-of-Bounds Read and Denial of Service (CVE-2025-62821)
Published: 2026-11-27 • Researcher: hyunjungg (GitHub repository author; crash analysis and PoC sample). CVE record published by MITRE on 2026-06-19.
- Severity
- Critical
- CVE
- CVE-2025-62821
- Category
- binary
- Affected product
- Microsoft HEIF Image Extensions, the Windows Store codec package that supplies msheif_store.dll to the Windows Imaging Component (WIC)
- Affected versions
- 1.2.22.0 (x64 package Microsoft.HEIFImageExtension_1.2.22.0_x64__8wekyb3d8bbwe) is the version named in the upstream report. The NVD record publishes no version range, so other builds that share the same item-size and CopyPixels code should be treated as potentially affected until tested.
- Disclosed
- 2026-11-27
- Patch status
- Unpatched
Tags
References
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2025-09-25 |
| Author / Researcher | hyunjungg (GitHub repository author; crash analysis and PoC sample). CVE record published by MITRE on 2026-06-19. |
| CVE / Advisory | CVE-2025-62821 |
| Category | binary |
| Severity | Critical |
| CVSS Score | 9.1 (CVSSv3.1, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H, NVD) |
| Status | PoC (input-only crash PoC; out-of-bounds read and access violation, no code execution demonstrated) |
| Tags | Windows, HEIF, HEIC, WIC, codec, image-parsing, out-of-bounds-read, CWE-125, denial-of-service, crash, Microsoft |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Microsoft HEIF Image Extensions, the Windows Store codec package that supplies msheif_store.dll to the Windows Imaging Component (WIC) |
| Versions Affected | 1.2.22.0 (x64 package Microsoft.HEIFImageExtension_1.2.22.0_x64__8wekyb3d8bbwe) is the version named in the upstream report. The NVD record publishes no version range, so other builds that share the same item-size and CopyPixels code should be treated as potentially affected until tested. |
| Language / Platform | C++ Windows x64 codec; the sample is a HEIF container opened through WIC consumers such as Photos, Explorer preview/thumbnails, or a custom decoder |
| Authentication Required | No |
| Network Access Required | No for the trigger (local file open); the file can of course be delivered by download, email or a web page |
Summary
CVE-2025-62821 is an out-of-bounds read in the HEIF Image Extensions codec that Windows uses to decode HEIC and HEIF images. A crafted image makes the item data size resolve to zero, so the decoder allocates a one-byte source buffer and later copies a stride-by-height region out of it with memmove. The read runs past the allocation and faults immediately, so opening or previewing the file crashes the host application or the shell thumbnail path, producing a denial of service. No code execution or data exfiltration chain is demonstrated in the published material.
Vulnerability Details
Root Cause
The codec under-allocates the source buffer and then trusts geometry-derived sizes during pixel copying. In the reconstructed flow, CHEIFItemInfoEntry_GetDataSize takes an early success path (when the inner sub_7FFD8408B898 check fails) and returns S_OK without writing the computed size, leaving it at zero. CHEIFStreamReader_ReadItemData then calls MFCreateMemoryBuffer(0, &ppBuffer), which per Media Foundation behavior yields a one-byte allocation.
Later, the CopyPixels path computes copy_size = stride * abs(roi_height) and calls memmove(dst, src, copy_size) without validating that the source buffer actually contains that many bytes. A mis-parsed image width such as 0x01000100 (16,777,472) inflates the stride and the copy size, so the vectorized load reads far beyond the one-byte heap allocation and raises an access violation. Function names above are reconstructed from logging strings and disassembly, as the upstream README notes, and are not vendor symbols.
Attack Vector
The attacker delivers a crafted HEIF file (web download, email attachment, chat, removable media, or a page that triggers a preview). The victim opens it in Microsoft Photos, selects it in Explorer, or otherwise passes it to any WIC consumer that routes HEIF decoding through the installed HEIF Image Extensions. No credentials, macros, or user interaction beyond opening or previewing the image are required.
Impact
Immediate out-of-bounds read and access violation in the decoding process, which crashes the application and can take down Explorer’s thumbnail or preview path. NVD scores confidentiality and availability as high: the oversized read can copy adjacent heap bytes into the destination bitmap before the fault, a potential information-disclosure primitive, and the crash is a reliable local denial of service. The public material demonstrates only the crash; no weaponized leak or code-execution chain is provided.
Environment / Lab Setup
OS: Windows 11 x64 (upstream report)
Target: HEIF Image Extensions 1.2.22.0
(Microsoft.HEIFImageExtension_1.2.22.0_x64__8wekyb3d8bbwe)
Sample: access_violation_0000xxxxxxxxx461_00000xxxxxxxx6B0_1.heif
Tools: Microsoft Photos, Windows Explorer, WinDbg (optional), the
author's private heif_decoder WIC harness (not published)Setup Steps
| |
The sample and analysis are Windows-specific. The entry was assembled on Linux and the crash was not independently reproduced while preparing it; the procedure and stack trace below are reconstructed from the upstream README and the NVD record.
Proof of Concept
Step-by-Step Reproduction
Prepare an isolated Windows 11 VM — Install HEIF Image Extensions 1.2.22.0 from the Microsoft Store and confirm the package version.
Place the sample — Copy
access_violation_0000xxxxxxxxx461_00000xxxxxxxx6B0_1.heifto a local folder on the test VM.Trigger decoding — Double-click the file so Microsoft Photos opens it, or select it in Explorer so the thumbnail or preview handler decodes it. The vulnerable copy path runs during CopyPixels.
Observe the crash — Photos or Explorer terminates with an access violation. For a debugger trace, attach WinDbg to the consuming process before step 3, or open the resulting crash dump.
Confirm the root cause — Inspect the faulting source pointer with
!heap -p -a <src>; the allocation is one byte, while the requested copy size is stride times the absolute ROI height.
Exploit Code
See
access_violation_0000xxxxxxxxx461_00000xxxxxxxx6B0_1.heifin this folder. This is an input-only PoC: the crafted HEIF is the exploit artifact, and no Python or shell driver is required.
The vulnerable operation, as reconstructed in the upstream analysis:
| |
The allocation path that produces the one-byte source buffer:
| |
Expected Output
(7de0.78e4): Access violation - code c0000005 (first chance)
msheif_store!DllCanUnloadNow+0x228b1d:
00007ffd`841bc45d c5fe6f02 vmovdqu ymm0,ymmword ptr [rdx] ds:000002b0`65be6ff0=c0
0:000> !heap -p -a rdx
address 000002b065be6ff0 found in
...
UserSize - VirtAddr VirtSize
1 - 2b065be6000 2000
...
MFPlat!MFCreateMemoryBuffer+0x0000000000000056
msheif_store!DllCanUnloadNow+0x0000000000081e71The UserSize of 1 is the under-allocated source buffer; the vmovdqu load at the faulting address is the out-of-bounds read. On a patched codec the file should either fail to decode cleanly or return a decoder error without an access violation.
Detection & Indicators of Compromise
SHA256 a782ef64d9d40ca1c75d129f1faac1ffd7317663b29488f5c4c3bdf5eab35fd0SIEM / IDS Rule (example):
title: HEIF Codec Access Violation in msheif_store.dll
logsource:
product: windows
service: application
detection:
selection:
EventID: 1000
FaultingModule|endswith: '\msheif_store.dll'
condition: selection
level: highRemediation
| Action | Detail |
|---|---|
| Patch | Update HEIF Image Extensions from the Microsoft Store and keep Windows and the codec package current. NVD does not name a fixed version, so validate the installed build against the crash sample before relying on it. |
| Workaround | Remove or disable the HEIF Image Extensions package on systems that do not need HEIC/HEIF support; block untrusted HEIF/HEIC files at mail and web gateways; disable Explorer thumbnails and the preview pane for download folders. |
| Config Hardening | Enforce SmartScreen and Mark-of-the-Web handling for downloaded images; isolate image parsing in a low-privilege VM or container; monitor WER events for msheif_store.dll faults and treat repeated crashes on opened files as an incident. |
References
Notes
- Verdict: genuine, non-malicious input-only PoC. The repository contains the crafted HEIF and a detailed crash analysis; NVD tags the repository as an exploit reference. There is no C2, persistence, evasion, credential theft, or other malware functionality.
- License: the upstream repository has no LICENSE file; the README is copied here as
upstream-README.mdfor attribution, and reuse terms are unspecified. - Limitations: Windows 11 and HEIF Image Extensions 1.2.22.0 only; the author’s
heif_decoderWIC harness is not published, so the crash is reproducible only by opening the sample in a WIC consumer on a vulnerable build. The crash was not independently reproduced for this archive. Function and variable names in the analysis are reconstructed from disassembly and may not match vendor symbols. - Sample: 335 bytes, SHA256
a782ef64d9d40ca1c75d129f1faac1ffd7317663b29488f5c4c3bdf5eab35fd0. Structurally, the meta box ends before the file’s trailing bytes and the item location points outside the file, consistent with the zero-size item path described upstream; this was inspected as data only and never executed. - NVD lists CVSS 9.1 with C:H/I:N/A:H and no fixed version; the high confidentiality score reflects the potential out-of-bounds read, while the published evidence is the access violation.