CVE-2026-112398

9.2Critical

Published Oct 19, 2026 · NVD status: Undergoing Analysis · AI triage by gemini-3.8-flash

9.2CVSS

Critical

0CVSS v4.010

Attack vector
Network
Complexity
High
Privileges
None
User action
None
Impact
Full C/I/A compromise
Weakness
CWE-122, CWE-787

What an attacker gets

Remote attackers can corrupt heap memory and potentially execute arbitrary code by submitting a malicious OLE2 FlashPix file. The target application only needs to open or thumbnail untrusted files while the optional olefile package is installed.

Root cause

The FlashPix JPEG-tile decoder allocates a two-byte-per-pixel buffer for raw mode LA, but writes four-component scanlines into it when encountering an unrecognized JPEG mode decoded as JCS_UNKNOWN.

Affected versions

Pillow versions prior to 13.0.0

CVSS v4.0 · 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Fix & remediation

Upgrade Pillow to version 13.0.0 or later. If updating immediately is not possible, uninstall the optional olefile dependency or reject OLE2 FlashPix files at the input boundary.

remediation — bash
$ pip install --upgrade 'pillow>=13.0.0'

AI-suggested. Run it in staging first and check it against the vendor advisory. Why?

NVD 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.

References

Source: nvd.nist.gov/vuln/detail/CVE-2026-112398

More fully triaged vulnerabilities you may want to check next.