NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2026-42309: Pillow has a heap buffer overflow with nested list coordinates

mediumCVSS 4.0 5.1 · 3.1 5.5GHSA-5xmw-vc9v-4wf2

Passing nested lists as coordinates to APIs that accept coordinates such as ImagePath.Path, ImageDraw.ImageDraw.polygon and ImageDraw.ImageDraw.line could cause a heap buffer overflow, as nested lists were recursively unpacked beyond the allocated buffer. Coordinate lists are now validated to contain exactly two numeric coordinates. This was introduced in Pillow 11.2.1.

Published May 4, 2026 · Updated Oct 19, 2026

Affected packages

pillow

Ecosystem
PyPI
Affected
>= 11.2.1, < 12.2.0
Fixed in
12.2.0
Check
pip show pillow

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Passing nested lists as coordinates to APIs that accept coordinates such as ImagePath.Path, ImageDraw.ImageDraw.polygon and ImageDraw.ImageDraw.line could cause a heap buffer overflow, as nested lists were recursively unpacked beyond the allocated buffer. Coordinate lists are now validated to contain exactly two numeric coordinates. This was introduced in Pillow 11.2.1.

Credited to ranjiGT.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries