{"id":"CVE-2026-96639","published":"2026-10-21T21:06:42Z","modified":"2026-10-29T10:51:37Z","title":"Pillow multi-frame loaders can reuse stale native image storage after mode transitions","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"Pillow is a Python imaging library. From 11.0.0 until 13.0.0, multi-frame loaders can retain an ImagingCore allocation created for a narrow frame mode while a later frame of the same dimensions changes the logical mode and decoder tiles to wider RGB or CMYK data. ImageFile.load_prepare() reuses the stale native storage because _im is non-null without verifying that its mode and size still match. Crafted PSD, MPO, DCX, or MIC frame transitions can then write wider pixels into the narrow allocation, causing native out-of-bounds writes and crashes. The MPO path can also cause a native over-read and, in demonstrated runtime-specific profiles, command execution. This issue is fixed in version 13.0.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00659,"percentile":0.52463,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/pull/10105","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":17.4,"factors":[{"name":"EPSS percentile","points":10.49},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":[">= 11.0.0, < 13.0.0"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-10-29T10:51:10.443055Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":[">=11.0.0, <13.0.0"],"patched":["13.0.0"],"from":["GHSA-v9pv-5gc8-w2m6","PYSEC-2026-4339"],"provenance":"source"}],"summary":{"text":"Pillow, the Python imaging library, contains a flaw in its multi-frame image loaders (versions 11.0.0 through 12.x, fixed in 13.0.0) where a retained native image allocation is reused without checking that its mode and size still match the next frame. An attacker who can supply a crafted PSD, MPO, DCX, or MIC file, with no authentication and no user interaction required, can trigger out-of-bounds memory writes that crash the process, and for MPO files can also cause out-of-bounds reads and, under certain runtime-specific configurations, command execution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-23T07:18:02Z"},"euvd":{"id":"EUVD-2026-107573","exploited":false,"provenance":"source"}}