Live threats

All CVEs / Python

CVE-2026-112398Python Pillow

Buffer Overflow in Pillow FlashPix JPEG Decoder

Critical 9.2 No auth needed

Priority
70
CVSS 4.0
9.2
EPSS
—
Auth required
No
Published
Oct 19, 2026
Updated
Oct 27, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-122, CWE-787
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: total
Vector
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

What happens

Pillow prior to 13.0.0 contains a buffer overflow in the FlashPix JPEG decoder that allows writing data beyond the allocated buffer. An attacker can supply a crafted OLE2 FlashPix file that corrupts heap memory and potentially executes arbitrary code in applications processing untrusted files with the olefile dependency installed.

Show the original NVD text

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.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 13.0.0

Update Pillow to version 13.0.0 or later.

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for Pillow.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI pillow < 13.0.0 13.0.0 pip install "pillow>=13.0.0"
PyPI pillow < 13.0.0 13.0.0 pip install "pillow>=13.0.0"

Per OSV / GitHub Advisories (GHSA-5x8w-8jj5-q52h, PYSEC-2026-4330). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pythonpillow< 13.0.0

Official advisories

Also: Red Hat (+7), SUSE (+4)

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.