Skip to content
NewA calmer, faster ZeroHour

CVE-2026-112402

Double-free in Pillow ImagingScaleAffine before 13.0.0

CVSS 4.0
8.7 high
EPSS
<1%p49
Published
·
Modified
Analyze CVE-2026-112402 with Vani AIImpact, affected versions, exploitation status, mitigations and detection

Pillow can double-free image memory when ImagingScaleAffine hits a selective allocation failure. The fast path covers Transform.EXTENT or pure scale-and-translate Transform.AFFINE with default NEAREST resampling: the output image allocates, the per-column lookup fails, and the error path frees storage that later cleanup frees again. An attacker who can force a large Image.transform() under memory pressure may crash the process and possibly corrupt memory. Releases before 13.0.0 are affected.

What to do: Upgrade Pillow to 13.0.0.

ProductAffectedFixed in
Pillowprior to 13.0.013.0.0
Estimated exposure
No basis for an estimate.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description · NVD

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.

Vendors
python
Products
pillow
Ecosystems
pip
Weakness
CWE-416
Vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/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
GHSA
GHSA-7mwm-ghpf-9vrm (high)

In the news

1 story