CVE-2026-42309
MEDIUMPillow: Heap buffer overflow with nested list coordinates
Title source: cnaDescription
Pillow is a Python imaging library. From version 11.2.1 to before version 12.2.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 issue has been patched in version 12.2.0.
References (2)
Core 2
Core References
X_Refsource_Confirm x_refsource_confirm
https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2
X_Refsource_Misc x_refsource_misc
https://github.com/python-pillow/Pillow/releases/tag/12.2.0
Scores
CVSS v3
5.5
EPSS
0.0001
EPSS Percentile
3.2%
Attack Vector
LOCAL
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CISA SSVC
Vulnrichment
Exploitation
none
Automatable
no
Technical Impact
partial
Details
CWE
CWE-122
Status
published
Products (3)
pypi/pillow
11.2.1 - 12.2.0PyPI
python/pillow
11.2.1 - 12.2.0
python-pillow/Pillow
>= 11.2.1, < 12.2.0
Published
May 09, 2026
Tracked Since
May 09, 2026