{"id":"CVE-2026-96639","published":"2026-10-21T21:20:32.217","lastModified":"2026-10-22T16:46:48.920","description":"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.","cvssScore":9.8,"cvssSeverity":"CRITICAL","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","cwes":["CWE-125","CWE-787"],"vendors":[],"products":[],"references":[{"url":"https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a","tags":[]},{"url":"https://github.com/python-pillow/Pillow/pull/10105","tags":[]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":[]},{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6","tags":[]}],"exploitRefs":[{"url":"https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a","tags":[]},{"url":"https://github.com/python-pillow/Pillow/pull/10105","tags":[]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":[]},{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6","tags":[]}],"hasPoc":true,"ai":{"summary":"A memory corruption flaw in Pillow versions 11.0.0–13.0.0 allows attackers to trigger out-of-bounds writes (CWE-787) and reads (CWE-125) when processing multi-frame images like PSD, MPO, DCX, or MIC. The vulnerability arises when frame mode/size changes between frames but the internal buffer is reused without validation, enabling crafted files to overwrite memory beyond allocated bounds.","exploitability":"Exploitation requires delivering a specially crafted multi-frame image file to an application using Pillow; no authentication or user interaction is needed (CVSS:3.1/AV:N/AC:L/PR:N/UI:N), and public PoCs exist, indicating low effort to exploit.","blast_radius":"Successful exploitation could lead to remote code execution (demonstrated in MPO path), data exfiltration, or service crashes, affecting any system processing untrusted images via Pillow.","remediation":"Upgrade Pillow to version 13.0.0 or later, as this issue is fixed in that release.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["memory-corruption","rce","image-processing","multi-frame","out-of-bounds"],"model":"garnet-coder","analyzedAt":"2026-10-24T08:56:23.532Z"}}