Heap-based buffer overflow in Pillow - CVE-2026-42309

 

Heap-based buffer overflow in Pillow - CVE-2026-42309

Published: April 23, 2026


Vulnerability identifier: #VU127174
CSH Severity: Medium
CVSS v4: 8.7 [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]
CVE-ID: CVE-2026-42309
CWE-ID: CWE-122
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to a heap-based buffer overflow in coordinate-processing APIs such as ImagePath.Path, ImageDraw.ImageDraw.polygon, and ImageDraw.ImageDraw.line when processing nested list coordinates. A remote attacker can pass nested lists as coordinates to cause a denial of service.

The issue was introduced in Pillow 11.2.1.


Affected software

Pillow

How to mitigate CVE-2026-42309

Install security update from vendor's website.

Pillow - update to 12.2.0

External References

Related Security Bulletins