CVE-2026-42309 Details
Description
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.
A heap buffer overflow vulnerability has been identified in the Python imaging library Pillow, specifically in versions 11.2.1 prior to 12.2.0. The issue arises when nested lists are passed as coordinates to certain APIs, including ImagePath.Path, ImageDraw.ImageDraw.polygon, and ImageDraw.ImageDraw.line. The nested lists were recursively unpacked beyond the limits of the allocated buffer, leading to the overflow. This vulnerability has been addressed in version 12.2.0, where coordinate lists are now properly validated to ensure they contain exactly two numeric coordinates.
Users can upgrade to Pillow version 12.2.0 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 11, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/python-pillow/Pillow/releases/tag/12.2.0 | [email protected] | ProductRelease Notes |
| https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2 | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-122 | Heap-based Buffer Overflow | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| python pillow | >= 11.2.1, < 12.2.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 12, 2026 | Initial Analysis | [email protected] |
| May 9, 2026 | New CVE Received | [email protected] |