Skip to content
Blog

libheif Heap Memory Leak Vulnerability (CVE-2026-47247) — High Severity

In this article
  1. CVE Details
  2. Affected Products
  3. Current Status
  4. Severity Level
  5. Possible Solutions
  6. References

Imagine sending an image file to be processed on a server, only to have that file accidentally reveal sensitive information hidden deep within the server’s memory. That’s precisely the risk posed by a critical vulnerability recently discovered in libheif, a popular software library used for decoding and encoding HEIF and AVIF image formats. This flaw could allow attackers to steal confidential data, including crucial system details, just by uploading a specially crafted image.

CVE Details

This vulnerability is identified as CVE-2026-47247. It was publicly disclosed on July 21, 2026, and its status is currently “Analyzed.” With a CVSS score of 7.5, it is classified as a High severity issue, indicating a significant risk to affected systems.

Affected Products

The core of this vulnerability lies within the libheif library, specifically versions prior to 1.22.0. Because libheif is widely used by many applications for handling modern image formats like AVIF and HEIC, the impact extends to a broad range of software and services. Confirmed affected applications include:

  • WordPress (when utilizing Imagick for image processing, which in turn uses libheif)
  • Sharp (a popular Node.js image processing library)
  • GNOME desktop environments (via the gdk-pixbuf heif loader)
  • pillow-heif (a Python Pillow plugin)

Additionally, other applications that rely on libheif through various image processing stacks are likely affected. These could include imgproxy, Ruby on Rails Active Storage (especially those using libvips since Rails 7), Mastodon, and even cloud image processing services like Cloudinary and Shopify. Desktop image editors such as GIMP, Krita, and darktable are also potentially at risk.

Current Status

The vulnerability, CVE-2026-47247, has been fully analyzed. This means security experts have thoroughly understood the nature of the flaw, how it can be exploited, and its potential impact. Fixes have been developed and released by the maintainers of libheif.

Severity Level

Rated as High severity with a CVSS score of 7.5, this vulnerability represents a serious threat. The ability to leak heap memory as visible pixel values in a decoded image is particularly dangerous. This heap data can contain sensitive information, including memory addresses (which could help bypass Address Space Layout Randomization, or ASLR, a security feature designed to make exploits harder) or other confidential secrets stored in memory. An attacker could remotely exploit this by simply uploading a malicious AVIF or HEIC file to a server that processes images with a vulnerable libheif version and then downloading the processed output (e.g., a JPEG or PNG thumbnail) to extract the hidden data. No special privileges or user interaction are required for a successful attack, making it highly potent.

Possible Solutions

The good news is that fixes are available. The primary solution is to update libheif to version 1.22.0 or later. This update addresses the two underlying bugs that allowed this information leak:

  1. Zero-initialization of pixel plane allocation: The patched version now ensures that memory allocated for pixel planes is completely cleared (zeroed out) before use. This prevents any stale heap data from being present in unused parts of the image buffer.
  2. Rejection of non-covering grid tiles: A change was made to prevent the processing of grid images where tiles do not fully cover the intended canvas. This eliminates the “gap pixels” that were previously used to expose the uninitialized heap memory.

System administrators and developers should prioritize updating libheif in any environment where it is used, especially on server-side image processing systems. If direct updating is not immediately possible, closely monitor any image uploads and their processing, although this is a reactive measure.

References

https://github.com/strukturag/libheif/security/advisories/GHSA-2vh6-whr3-cmq3

Share
Alex Joseph

Alex Joseph

Alex Joseph is a Senior Support Staff professional with deep experience in server management, web hosting technologies, and cybersecurity operations. He works daily with Linux servers, cloud platforms, performance tuning, and security hardening, giving him strong real-world technical knowledge. Along with his support role, he write about security best practices, hosting infrastructure, and software management.

Related updates

Start Building Today

Ready to Get Started?

VPS, dedicated servers, streaming and managed hosting with 24/7 support from the Ucartz team.