Advisory

GHSA-5xmw-vc9v-4wf2

Also known as: BIT-pillow-2026-42309, CVE-2026-42309, PYSEC-2026-2251

Summary

Pillow has a heap buffer overflow with nested list coordinates

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-05-04 20:18 UTC
Modified
2026-10-19 20:00 UTC

Affected packages and fixes

pillow

PyPI · All systems

Affected

  • introduced 11.2.1, fixed 12.2.0 (ecosystem)

Fixed versions

12.2.0

Fix

  • Fixed version 12.2.0
    pip install --upgrade pillow==12.2.0

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences