{"id":"CVE-2026-42309","aliases":["CVE-2026-42309","GHSA-5xmw-vc9v-4wf2","BIT-PILLOW-2026-42309","PYSEC-2026-2251"],"related":[],"kind":"vulnerability","state":"published","title":"Pillow: Heap buffer overflow with nested list coordinates","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Pillow es una biblioteca de imágenes de Python. Desde la versión 11.2.1 hasta antes de la versión 12.2.0, pasar listas anidadas como coordenadas a APIs que aceptan coordenadas, como ImagePath.Path, ImageDraw.ImageDraw.polygon e ImageDraw.ImageDraw.line, podría causar un desbordamiento de búfer de montón, ya que las listas anidadas se desempaquetaban recursivamente más allá del búfer asignado. Las listas de coordenadas ahora se validan para que contengan exactamente dos coordenadas numéricas. Este problema ha sido parcheado en la versión 12.2.0.","source":"nvd"}],"published":"2026-05-04T20:18:27.000Z","modified":"2026-10-19T20:00:04.709Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":5.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-122"],"affected":[{"ranges":[{"version":">= 11.2.1, < 12.2.0","status":"affected"}],"vendor":"python-pillow","product":"Pillow","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"11.2.1","status":"affected","fixed":"12.2.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"11.2.1","fixed":"12.2.0"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"11.2.1","status":"affected","fixed":"12.2.0"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"11.2.1","status":"affected","fixed":"12.2.0"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-5xmw-vc9v-4wf2","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/12.2.0","tags":["advisory","article","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42309","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/designcomputer/mysql_mcp_server/commit/a96549f4a4d65443fd6e9c7f2324fba9a5c80a82","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/python-pillow/Pillow/commit/cf6de8ca9b23e714aa5310e1c791eda66fc0b670","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2251.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-11T14:48:09.669Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42309","url":"https://www.cve.org/CVERecord?id=CVE-2026-42309","licence":"CVE Terms of Use","modified":"2026-05-11T14:48:18.204Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5xmw-vc9v-4wf2","url":"https://github.com/advisories/GHSA-5xmw-vc9v-4wf2","licence":"CC-BY-4.0","modified":"2026-10-19T20:00:04.709Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42309","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42309","licence":"Public domain","modified":"2026-07-24T21:10:00.143Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2251","url":"https://osv.dev/vulnerability/PYSEC-2026-2251","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:28.768Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2026-42309","url":"https://osv.dev/vulnerability/BIT-PILLOW-2026-42309","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.535Z"}],"updatedAt":"2026-11-25T22:59:21.140Z","epss":{"score":0.00133,"percentile":0.03015,"date":"2026-12-01T12:00:22.000Z"}}