{"id":"CVE-2026-96639","state":"PUBLISHED","title":"Pillow multi-frame loaders can reuse stale native image storage after mode transitions","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.","publishedAt":"2026-10-21T21:06:42.111Z","updatedAt":"2026-10-29T10:51:37.735Z","severity":{"score":9.8,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["python-pillow Pillow"],"affected":[{"vendor":"python-pillow","product":"Pillow","versions":[{"version":">= 11.0.0, < 13.0.0","status":"affected"}]}],"references":["https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6","https://github.com/python-pillow/Pillow/pull/10105","https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a","https://github.com/python-pillow/Pillow/releases/tag/13.0.0"],"weaknesses":["CWE-125","CWE-787"],"ingestedAt":"2026-10-29T20:13:43.249Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/96xxx/CVE-2026-96639.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-96639","state":"PUBLISHED","datePublished":"2026-10-21T21:06:42.111Z","dateUpdated":"2026-10-29T10:51:37.735Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-09-23T14:35:50.130Z"},"containers":{"cna":{"title":"Pillow multi-frame loaders can reuse stale native image storage after mode transitions","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"python-pillow","product":"Pillow","versions":[{"version":">= 11.0.0, < 13.0.0","status":"affected"}]}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-v9pv-5gc8-w2m6","name":"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","name":"https://github.com/python-pillow/Pillow/pull/10105","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a","name":"https://github.com/python-pillow/Pillow/commit/78d97d994579aef81aafe123773d525f40f2522a","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","name":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-125","lang":"en","description":"CWE-125: Out-of-bounds Read","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-787","lang":"en","description":"CWE-787: Out-of-bounds Write","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-10-21T21:06:42.111Z"},"source":{"advisory":"GHSA-v9pv-5gc8-w2m6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-10-29T10:51:10.443055Z","id":"CVE-2026-96639","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-29T10:51:37.735Z"}}]}}}