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.1MediumExploitationNo 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
What fixes it
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
- github.com/python-pillow/Pillow/releases/tag/12.2.0Fixvia CVE List
- github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670Fixvia GitHub
- github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82Fixvia GitHub
- github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2Advisoryvia CVE List
- github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yamlAdvisoryvia GitHub
- github.com/advisories/GHSA-5xmw-vc9v-4wf2Advisoryvia GitHub
- nvd.nist.gov/vuln/detail/CVE-2026-42309Referencevia GitHub