Live threats

All CVEs / Python

CVE-2026-112403Python Pillow

Buffer Overflow in Pillow 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
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 vulnerability in its JPEG decoder that allows writing data beyond buffer boundaries when scaling is requested. An attacker can supply a malformed JPEG file to applications using draft() or thumbnail() to cause memory corruption, process crash, or remote code execution.

Show the original NVD text

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's JPEG decoder can write a full-width scanline into a buffer sized for a requested draft scale. ImagingJpegDecode does not verify libjpeg's actual output width and component count after scaling is requested, and an 8-bit lossless SOF3 JPEG decoded by a build linked to libjpeg-turbo 3.x can ignore the requested downscaling geometry. An attacker can supply such a JPEG to an application that uses draft() or thumbnail() to request downscaling. This can corrupt heap memory, crash the process, or potentially allow code execution. Older libjpeg-turbo 2.x and IJG builds reject the SOF3 input. 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-8g5g-8vmr-9782, PYSEC-2026-4332). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pythonpillow< 13.0.0

Official advisories

Also: Red Hat (+2), SUSE (+3)

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

Official sources

References

Links published by the sources. Open them with care.