External risk intelligence

Pillow FlashPix Decoder Heap Corruption Vulnerability

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-112398

Pillow is a software library, not a standalone network-facing service. Vulnerability exploitation requires an application using the library to process a specially crafted file from an untrusted source, such as a user-uploaded image. While many web applications perform such processing, the library itself is an internal component, making its exposure dependent on the specific deployment context of the host application.

Out-of-bounds Write

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory describes a vulnerability in the Pillow Python imaging library that could allow arbitrary code execution when processing specially crafted FlashPix JPEG files. This flaw arises from an issue in how the library decodes certain image formats, potentially corrupting memory and enabling unauthorized control of affected systems if an application processes untrusted input. The main concern is confirming relevance and exposure to this library.

  • Image library flaw risks code execution.
  • Affects applications processing crafted image files.
  • Confirm if this imaging library is in use.

Attack Path

How an attacker could exploit the issue

An attacker could target applications that process image files using a vulnerable version of the Pillow library. By providing a specially crafted FlashPix JPEG file, an attacker could cause the library to write data beyond its intended buffer when decoding certain image formats. This memory corruption could lead to serious consequences for the application.

  • Attacker provides a crafted file.
  • Vulnerable image decoding feature is triggered.
  • Heap corruption may lead to code execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, applications processing crafted OLE2 FlashPix files with the olefile dependency could experience heap corruption. This may lead to arbitrary code execution when untrusted input is opened or thumbnailed.

  • Corrupt heap memory.
  • Process crafted FlashPix files.
  • Arbitrary code execution.

Operational Fix

Recommended remediation, mitigation, and detection steps

Application owners and development teams are likely responsible for addressing this vulnerability within their Python applications that utilize the Pillow library. The first practical step involves identifying all instances of the affected Pillow version, determining if they process untrusted input, and assessing their criticality. Subsequently, a plan for remediation, such as updating the library, should be developed based on the identified risk.

  • Application owners should address this.
  • Verify untrusted input processing.
  • Plan remediation based on risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the Pillow library?

Pillow is a widely used Python library that adds image processing capabilities to applications. It allows developers to open, manipulate, and save many different image file formats. It acts as a foundational component within larger software systems, often used for tasks like resizing uploaded user photos, generating thumbnails, or processing complex image files.

How does CVE-2026-112398 cause memory corruption?

This vulnerability is a heap-based buffer overflow, classified as CWE-122 and CWE-787. It occurs because the library's FlashPix decoder misinterprets specific JPEG data modes. It accidentally writes four bytes of color data for every pixel into a buffer that was only designed to hold two bytes. This mismatch causes data to spill over into adjacent memory, which can corrupt the system's heap and potentially allow an attacker to hijack program execution.

What triggers this vulnerability in Pillow?

The flaw is triggered when an application uses a vulnerable version of Pillow to open or thumbnail a specially crafted FlashPix (FPX) image file while the optional 'olefile' dependency is present. The vulnerability does not trigger if the application only processes standard, trusted images, or if the library is never tasked with decoding these specific, malformed FlashPix JPEG tiles.

Do I need to worry about this CVE if my app is internal?

According to Halo Surface Signal, Pillow is a library rather than a standalone network service, so risk depends heavily on how your application uses it. If your internal application processes image files uploaded by users or fetched from untrusted external sources, it is at higher risk. If the application only processes images from strictly trusted internal sources, the practical risk is lower.

How should I respond to the CVE-2026-112398 advisory?

Start by identifying where your software stack uses the Pillow library and confirm if your environment includes the olefile dependency. Prioritize reviewing applications that handle images from untrusted sources. Once identified, plan to update to version 13.0.0 or later, which contains the necessary security fixes to handle these image tiles correctly.

References