CVE-2026-112398
Critical · 9.8CVSS
9.8
EPSS
0.7%
Published
Oct 19, 2026
CISA due date
—
Cloudanix analysis
A bug in a popular Python tool for handling pictures could let attackers take control of computers by sending specially crafted image files.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Remote Code Execution
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Heap buffer overflow in Pillow's FlashPix JPEG-tile decoder where four-component JCS_UNKNOWN scanlines are written into a two-byte-per-pixel LA tile buffer, corrupting adjacent heap memory.
Why it matters to the business
Attackers may achieve remote code execution on systems processing untrusted images with the olefile dependency present; risk is rising as exploit probability has increased 78% in the last 30 days and the flaw is only seven days old.
How an attack unfolds
An attacker creates a crafted OLE2 FlashPix file containing a JPEG tile decoded as JCS_UNKNOWN, delivers it to an application that uses Pillow to open or thumbnail images, and triggers the decoder mismatch to overflow the tile buffer and execute arbitrary code.
How to fix it
Upgrade Pillow to version 13.0.0 or later; remove the optional olefile dependency if FlashPix support is unnecessary.
How to confirm the fix worked
Verify the installed Pillow version is 13.0.0 or newer; test image processing pipelines with known-good and malformed FlashPix samples under controlled conditions.
Typical attack path
- Craft a malicious OLE2 FlashPix file with an unrecognized JPEG mode
- Deliver the file to a target application that depends on Pillow and olefile
- Trigger image opening or thumbnail generation
- Cause ImagingJpegDecode to write four-component data into the two-byte buffer
- Corrupt heap memory to achieve code execution
How to detect it
Review application logs for Pillow image decoding of FlashPix or OLE2 files, monitor for crashes or abnormal memory usage during thumbnail or open operations on untrusted input.
What your security team should do
- Upgrade Pillow to 13.0.0 or later within the next 48 hours given rising EPSS and recent publication
- Audit all applications for Pillow + olefile usage and restrict untrusted image input
- Add runtime checks or sandboxing around image decoding workflows
The record
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's FlashPix JPEG-tile decoder can write decoded scanlines beyond the allocated tile buffer. FlashPix (FPX) JPEG decoding selects raw mode LA with two bytes per pixel, while an unrecognized JPEG mode can be decoded as JCS_UNKNOWN with four components, causing ImagingJpegDecode to write four-component scanlines into the two-byte tile buffer. An attacker can supply a crafted OLE2 FlashPix file to an application with the optional olefile dependency installed that opens or thumbnails untrusted input. This can corrupt heap memory and may allow arbitrary code execution. This issue is fixed in version 13.0.0.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-119727 A flaw was found in GStreamer's gst-plugins-bad H.265 video parser. CWE-122
- CVE-2026-110133 A flaw was found in Ghostscript. CWE-122
- CVE-2026-9536 A heap-based buffer overflow vulnerability exists in the vtkWindBladeReader… CWE-122
- CVE-2026-96198 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-96199 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-85897 Heap-based buffer overflow in Microsoft Edge (Chromium-based) allows an unauthorized… CWE-122
- CVE-2026-119124 ImageMagick before 7.1.2-34 contains a heap-based buffer overflow in its -morph… CWE-122
- CVE-2026-93523 A heap buffer overflow caused by a XIPassiveUngrabDevice request with an out-of-range… CWE-122