8.7High

CVE-2026-112402Pillow: Double free in ImagingScaleAffine on calloc failure via Image.transform

python-pillow Pillow Published: (1 month ago)

Description

Pillow is a Python imaging library. Prior to 13.0.0, Pillow can double free image memory when ImagingScaleAffine encounters a selective allocation failure. The affected fast path handles Transform.EXTENT or pure scale-and-translate Transform.AFFINE operations with the default NEAREST resampling. The output image allocation must succeed while the additional per-column lookup allocation fails, after which the error path deletes image storage that later cleanup releases again. An attacker who can drive such a large Image.transform() operation under memory pressure may trigger the failure. This can crash the process and may corrupt memory. This issue is fixed in version 13.0.0.

Weakness (CWE): CWE-416

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
python pillow < 13.0.0
python-pillow Pillow < 13.0.0

Ubuntu fixes

  • USN-9064-2 Pillow regression Ubuntu 26.10, 26.04 · 16.11.2026 · pillow
  • USN-9064-1 Pillow vulnerabilities Ubuntu 26.10, 26.04, 24.04, 22.04, 20.04, 18.04, 16.04, 14.04 · 12.11.2026 · pillow

References and patches

CPE matches (NVD) (1)

  • cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* < 13.0.0