Double free in Pillow - CVE-2026-112402

 

Double free in Pillow - CVE-2026-112402

Published: November 3, 2026


Vulnerability identifier: #VU158895
CSH Severity: Medium
CVSS v4: 8.2 [CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-112402
CWE-ID: CWE-415
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service by crashing an image-processing worker.

The vulnerability exists due to a double free in Pillow's ImagingScaleAffine() function when a lookup-table allocation fails during Image.transform(). The error handler frees the caller-owned output image, which is freed again during Python object cleanup. A remote attacker can supply an oversized output width to an application exposing Transform.EXTENT or a pure scale/translate Transform.AFFINE operation with NEAREST resampling to trigger heap corruption and crash the worker.


Affected software

Pillow
Anolis OS
python3-pillow
python3-pillow-devel
python3-pillow-qt
python3-pillow-tk
python3-pillow-doc

How to mitigate CVE-2026-112402

Install security update from vendor's website.

Pillow - update to 13.0.0
python3-pillow - update to 12.3.0-2
python3-pillow-devel - update to 12.3.0-2
python3-pillow-qt - update to 12.3.0-2
python3-pillow-tk - update to 12.3.0-2
python3-pillow-doc - update to 12.3.0-2

External References

Related Security Bulletins