# CVE-2026-112402: Pillow: Double free in ImagingScaleAffine on calloc failure via Image.transform

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 43% of CVEs (2026-11-30)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-19T21:18:57.027Z
- Modified: 2026-10-29T10:45:08.267Z
- Also known as: GHSA-7mwm-ghpf-9vrm, BIT-PILLOW-2026-112402, PYSEC-2026-4331
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- python-pillow Pillow: < 13.0.0
- pillow (PyPI): before 13.0.0
- python pillow: before 13.0.0
- pillow (Bitnami): before 13.0.0

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://github.com/python-pillow/Pillow/security/advisories/GHSA-7mwm-ghpf-9vrm> (exploit, advisory, fix, mitigation, patch, vendor-advisory, web)
- <https://github.com/python-pillow/Pillow/commit/aafa6c75f7cdabb9f409a8aac7c780bea31d08d9> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/releases/tag/13.0.0> (advisory, article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-112402> (advisory, web)
- <https://github.com/python-pillow/Pillow> (package)

## Sources

- CVE List: [CVE-2026-112402](https://www.cve.org/CVERecord?id=CVE-2026-112402), CVE Terms of Use, modified 2026-10-19
- GitHub Advisory Database: [GHSA-7mwm-ghpf-9vrm](https://github.com/advisories/GHSA-7mwm-ghpf-9vrm), CC-BY-4.0, modified 2026-10-28
- NVD: [CVE-2026-112402](https://nvd.nist.gov/vuln/detail/CVE-2026-112402), Public domain, modified 2026-10-27
- PyPA Advisory Database: [PYSEC-2026-4331](https://osv.dev/vulnerability/PYSEC-2026-4331), CC-BY-4.0, modified 2026-10-28
- Bitnami Vulnerability Database: [BIT-PILLOW-2026-112402](https://osv.dev/vulnerability/BIT-PILLOW-2026-112402), Apache-2.0, modified 2026-10-29

---

Page: https://cve.day/CVE-2026-112402 · Whole record: https://cve.day/CVE-2026-112402.json · Rebuilt by cve.day 2026-11-25T22:59:45.950Z
