Skip to main content
Vulnerability Database/CVE-2026-111149

CVE-2026-111149: FreeImage Use-After-Free Vulnerability

CVE-2026-111149 is a use-after-free vulnerability in FreeImage library affecting versions through 3.19.23, enabling attackers to trigger heap memory corruption. This article covers technical details, affected versions, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111149 Overview

CVE-2026-111149 is a heap out-of-bounds read vulnerability in the danoli3 fork of FreeImage through version 3.19.23. The flaw resides in the Unpack32Bits() function within PluginPICT.cpp, which processes PICT image files. The function fails to validate the rowBytes field against the file-controlled PixMap width before performing plane conversion. An attacker who supplies a crafted PICT file with a truncated or undersized rowBytes value can trigger an over-read of up to 64 KiB of heap memory. The leaked bytes can appear in decoded pixel output or cause the host process to crash. The weakness is classified under CWE-125: Out-of-bounds Read.

Critical Impact

Processing a malicious PICT file can leak up to 64 KiB of adjacent heap memory into decoded image data or crash applications that embed the vulnerable FreeImage build.

Affected Products

  • FreeImage (danoli3 fork) versions up to and including 3.19.23
  • The PluginPICT.cpp PICT decoder, specifically the Unpack32Bits() routine
  • Applications and libraries that bundle or link against the vulnerable danoli3 FreeImage fork

Discovery Timeline

  • 2026-10-15 - CVE-2026-111149 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-111149

Vulnerability Analysis

The PICT format stores raster imagery inside a PixMap structure that declares both a pixel width and a rowBytes value describing the byte length of each decoded scanline. In Unpack32Bits(), the decoder uses rowBytes as the loop bound while reconstructing 32-bit RGBA pixels from separate color planes. When rowBytes is smaller than what the declared width requires, downstream plane-conversion math still reads source bytes based on the width expectation. The result is an out-of-bounds read beyond the allocated line buffer on the heap. See the Vulncheck advisory and the HackMD analysis for a detailed walkthrough.

Root Cause

The root cause is missing validation of attacker-controlled size metadata. The code trusts rowBytes without checking it against the PixMap width multiplied by the bytes-per-pixel. Because both fields are parsed from the file, an attacker can decouple them to force the plane-conversion loop to walk past the allocated buffer. This is a classic input-validation failure in a file-format parser.

Attack Vector

Exploitation requires a local user to open or process a crafted PICT file with an application built against the vulnerable FreeImage fork. User interaction is required. The over-read can leak up to 64 KiB of heap data into pixel output, which an attacker can later recover from saved or re-encoded images. Alternatively, reading unmapped memory crashes the host process, yielding a denial of service. The vulnerability does not grant code execution or integrity impact on its own, but leaked heap contents may contain secrets, pointers, or ASLR-defeating addresses useful in a larger chain. The vulnerable function is referenced in the PICT plugin source.

Detection Methods for CVE-2026-111149

Indicators of Compromise

  • PICT files whose PixMap declares a rowBytes value inconsistent with width * 4 for 32-bit images
  • Image-processing or thumbnailing services that crash when parsing attacker-supplied .pct or .pict content
  • Decoded output images that contain banded regions of noise suggestive of leaked heap bytes

Detection Strategies

  • Build a software bill of materials (SBOM) query to flag binaries that statically link the danoli3 FreeImage fork at or below 3.19.23
  • Add a format-aware inspection rule that compares PixMap.rowBytes against PixMap.bounds width during PICT ingestion and rejects mismatches
  • Instrument image-decoder processes with AddressSanitizer in pre-production to catch heap-buffer-overflow reads during fuzzing of PICT corpora

Monitoring Recommendations

  • Monitor file-conversion, thumbnailer, and preview services for repeated segmentation faults correlated with PICT inputs
  • Alert on uploads of PICT files to web applications that call FreeImage, especially from unauthenticated endpoints
  • Capture process crash dumps from image-handling workloads and triage any faulting addresses inside Unpack32Bits or neighboring PICT routines

How to Mitigate CVE-2026-111149

Immediate Actions Required

  • Inventory applications using the danoli3 FreeImage fork and identify any at version 3.19.23 or earlier
  • Disable PICT ingestion in image-processing pipelines that do not require the format
  • Restrict upload or import of .pct and .pict files from untrusted sources until a patched build is deployed
  • Run FreeImage-based decoders under reduced privileges and sandboxing to contain memory disclosure and crashes

Patch Information

At the time of publication, no fixed release of the danoli3 FreeImage fork is referenced in the advisory. Monitor the FreeImage repository for a patched commit that validates rowBytes against the PixMap width in Unpack32Bits(). Downstream consumers should rebuild and redistribute binaries once the upstream fix lands.

Workarounds

  • Apply a local patch that computes the expected scanline size as width * bytes_per_pixel and rejects PICT files whose rowBytes is smaller
  • Pre-filter incoming PICT files with a validation step that parses the PixMap header and discards inconsistent records before they reach Unpack32Bits()
  • Switch to an alternative image-decoding library for the PICT format where feasible, or disable PICT support at build time
  • Enforce memory-safety mitigations such as heap hardening and process sandboxing for any service that must continue decoding PICT content
bash
# Configuration example: disable PICT handling at the application layer
# Example for a hypothetical image service config
image_decoders:
  pict:
    enabled: false
  jpeg:
    enabled: true
  png:
    enabled: true

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.