CVE-2026-112398: CWE-122: Heap-based Buffer Overflow in python-pillow Pillow
Description
A heap-based buffer overflow vulnerability exists in the FlashPix JPEG-tile decoder of the python-pillow Pillow library prior to version 13.0.0. The flaw occurs when decoding crafted OLE2 FlashPix files with the optional olefile dependency, causing decoded scanlines to be written beyond the allocated buffer. This can corrupt heap memory and potentially allow arbitrary code execution. The issue is fixed in Pillow version 13.0.0.
CVSS v4.0
Score 9.2critical
Affected software
python-pillow
Pillow
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Pillow, a Python imaging library, contains a heap-based buffer overflow vulnerability (CWE-122) in its FlashPix JPEG-tile decoder in versions prior to 13.0.0. The vulnerability arises because the decoder selects raw mode LA with two bytes per pixel, but an unrecognized JPEG mode can be decoded as JCS_UNKNOWN with four components. This mismatch causes the ImagingJpegDecode function to write four-component scanlines into a two-byte tile buffer, leading to heap corruption. An attacker can exploit this by supplying a crafted OLE2 FlashPix file to an application that uses Pillow with the optional olefile dependency installed to open or thumbnail untrusted input. This vulnerability is addressed and fixed in Pillow version 13.0.0.
Potential Impact
Exploitation of this vulnerability can lead to heap memory corruption and may allow an attacker to execute arbitrary code on the affected system. The CVSS 4.0 score is 9.2, indicating a critical severity with network attack vector, high complexity, no privileges required, no user interaction, and high impacts on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade to Pillow version 13.0.0 or later, where this heap-based buffer overflow vulnerability in the FlashPix JPEG-tile decoder is fixed. No other mitigation steps are indicated by the vendor advisory.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-19T16:58:51.959Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad68cd42cdf04f65692eebe
Added to database: 10/19/2026, 21:34:12 UTC
Last enriched: 10/19/2026, 21:48:24 UTC
Last updated: 10/19/2026, 21:48:24 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.