Skip to main content

CVE-2026-112398: CWE-122: Heap-based Buffer Overflow in python-pillow Pillow

0
Critical
VulnerabilityCVE-2026-112398cvecve-2026-112398cwe-122cwe-787
Published: 10/19/2026 (10/19/2026, 21:07:25 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: 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

Attack Vector
Network
Attack Complexity
High
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected software

python-pillow

Pillow

Affected versions
<13.0.0
pillow
pkg:pypi/pillow
Affected versions
<13.0.0

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

AILast updated: 10/19/2026, 21:48:24 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses