All vulnerabilities
CVE-2026-42309BIT-pillow-2026-42309GHSA-5xmw-vc9v-4wf2PYSEC-2026-2251

Pillow has a heap buffer overflow with nested list coordinates

python-pillow pillowpipLibraries & packages
CVSS
5.1Medium
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.18%Chance of exploitation activity in the next 30 days, higher than 7% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in12.2.0Fixed versionGitHub
Published9 May 2026Updated 19 Oct 2026CVE List

What fixes it

  • 12.2.0pillow, pipGitHub
  • 12.2.0pillow, PyPIOSVpip install "pillow>=12.2.0"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

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.

Text from CVE List

Affected versions 8

  • pillow, pip>= 11.2.1, < 12.2.0GitHub
  • Pillowaffected: >= 11.2.1, < 12.2.0CVE List
  • pillow, PyPIfrom 11.2.1, fixed in 12.2.0OSV
  • pillow, PyPI11.2.1OSV
  • pillow, PyPI11.3.0OSV
  • pillow, PyPI12.0.0OSV
  • pillow, PyPI12.1.0OSV
  • pillow, PyPI12.1.1OSV

References 7