{"id":"CVE-2026-112402","published":"2026-10-19T21:18:57Z","modified":"2026-10-19T21:37:35Z","title":"Pillow: Double free in ImagingScaleAffine on calloc failure via Image.transform","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"Pillow is a Python imaging library. Prior to 13.0.0, Pillow can double free image memory when ImagingScaleAffine encounters a selective allocation failure. The affected fast path handles Transform.EXTENT or pure scale-and-translate Transform.AFFINE operations with the default NEAREST resampling. The output image allocation must succeed while the additional per-column lookup allocation fails, after which the error path deletes image storage that later cleanup releases again. An attacker who can drive such a large Image.transform() operation under memory pressure may trigger the failure. This can crash the process and may corrupt memory. 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.00594,"percentile":0.49354,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-7mwm-ghpf-9vrm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/aafa6c75f7cdabb9f409a8aac7c780bea31d08d9","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/13.0.0","tags":["x_refsource_MISC"]}],"priority":{"score":16.0,"factors":[{"name":"EPSS percentile","points":9.87},{"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:14.144311Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":["<13.0.0"],"patched":["13.0.0"],"from":["GHSA-7mwm-ghpf-9vrm","PYSEC-2026-4331"],"provenance":"source"}],"summary":{"text":"Pillow, the Python imaging library, has a double-free flaw in its ImagingScaleAffine routine, which is hit on the fast path for Image.transform() when using EXTENT or pure scale-and-translate AFFINE operations with NEAREST resampling. An attacker with network access and no authentication or user interaction could trigger it by driving a large transform operation while memory allocation is failing, which can crash the process and may corrupt memory.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:29:26Z"},"euvd":{"id":"EUVD-2026-104641","exploited":false,"provenance":"source"}}