{"id":"CVE-2026-112397","published":"2026-10-19T21:17:35Z","modified":"2026-10-19T21:38:18Z","title":"Pillow: Out-of-bounds access in _imagingmorph on a zero-width image","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"Pillow is a Python imaging library. Prior to 13.0.0, Pillow's ImageMorph.MorphOp.apply() can access memory before a row buffer for a zero-width image. PPM and PGM input can create an image with width zero, and the native morphology routine indexes outrow[width - 1] without rejecting that geometry. An attacker can supply such an image to an application that applies a morphology operation. This can crash the process. This issue is fixed in version 13.0.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.7,"severity":"HIGH","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00532,"percentile":0.45798,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-58r4-6rv3-gfh8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/18f7c0dfee93063c51db6ed0ca8c4da2999dcb64","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":15.2,"factors":[{"name":"EPSS percentile","points":9.16},{"name":"CVSS severity","points":6.09}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":["< 13.0.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-10-19T21:37:56.314774Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":["<13.0.0"],"patched":["13.0.0"],"from":["GHSA-58r4-6rv3-gfh8","PYSEC-2026-4329"],"provenance":"source"}],"summary":{"text":"The flaw is an out-of-bounds memory access in Pillow's native morphology routine (_imagingmorph), which Pillow's ImageMorph.MorphOp.apply() calls, affecting zero-width images before version 13.0.0. Zero-width images can be created from PPM and PGM input because the routine does not reject that geometry, so it reads memory before a row buffer. An attacker who can supply a PPM or PGM image to an application that applies a morphology operation can crash the process; no authentication, user interaction, or special configuration is described as required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:31:09Z"},"euvd":{"id":"EUVD-2026-104640","exploited":false,"provenance":"source"}}