Critical severity · published Oct 19, 2026
CVE-2026-112398
Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution
9.8
CVSS
0.6%
EPSS
No
On KEV
Description
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 47% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PI
Pillow · python-pillow
< 13.0.0 · source: vendor, NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-112398
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-112398
github.com
https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75
github.com
https://github.com/python-pillow/Pillow/releases/tag/13.0.0
github.com
https://github.com/python-pillow/Pillow/security/advisories/GHSA-5x8w-8jj5-q52h
More from Pillow
9.8
CVE-2026-96639
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
9.8
CVE-2026-112900
Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
9.8
CVE-2026-112403
Pillow: Heap buffer overflow in ImagingJpegDecode
9.8
CVE-2026-112393
Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
9.1
CVE-2026-54058
Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files)
