CVE-2026-42309
Pillow is a Python imaging library. From version 11.2.1 to before …
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.
What to do now
- Check your exposureFind out whether the affected software runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Set the orderSystems that can be reached from the internet come first, then the rest.
References
- github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2
- github.com/advisories/GHSA-5xmw-vc9v-4wf2
- github.com/python-pillow/Pillow/releases/tag/12.2.0
- nvd.nist.gov/vuln/detail/CVE-2026-42309
- github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670
- github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yaml
- github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82
- nvd.nist.gov/vuln/detail/CVE-2026-42309
- cve.org/CVERecord?id=CVE-2026-42309
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.