CVE-2026-42309

MEDIUM CVSS 4.0: 5.1 EPSS 0.13%
Updated Jul 25, 2026
Python
Parameter Value
CVSS 5.1 (MEDIUM)
Affected Versions 11.2.1 — 12.2.0
Fixed In 12.2.0
Type CWE-122 (Heap-based Buffer Overflow)
Vendor Python
Public PoC No

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.

Attack Parameters

Attack Vector
Local
Requires local access
Attack Complexity
Low
Easy to exploit
Attack Requirements
None
No additional conditions
Privileges Required
None
No privileges needed
User Interaction
None
No user interaction needed

Impact Assessment

Confidentiality
None
No data leak
Integrity
None
No data modification
Availability
Low
Partial disruption

CVSS Vector v4.0

Vulnerable Products 1

Configuration From (including) Up to (excluding)
Python Pillow
cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
11.2.1 12.2.0