CVE-2026-112402: CWE-416: Use After Free in python-pillow Pillow
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.
CVSS v4.0
Score 8.7high
Affected software
python-pillow
Pillow
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Pillow versions before 13.0.0 contain a use-after-free vulnerability (CWE-416) in the ImagingScaleAffine function. Specifically, when handling Transform.EXTENT or pure scale-and-translate Transform.AFFINE operations with default NEAREST resampling, if the output image allocation succeeds but a subsequent per-column lookup allocation fails, the error handling path frees image storage that is later freed again during cleanup. This double free can be triggered by an attacker who can induce a large Image.transform() operation under memory pressure, potentially causing a crash and memory corruption. The vulnerability is fixed in version 13.0.0.
Potential Impact
Exploitation of this vulnerability can cause the affected process to crash and may lead to memory corruption. This could result in denial of service or potentially other undefined behavior depending on the context in which the library is used. No known exploits are reported in the wild.
Mitigation Recommendations
Upgrade to Pillow version 13.0.0 or later, where this use-after-free vulnerability has been fixed. No other mitigation is indicated or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-19T16:58:51.959Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6ad68cd42cdf04f65692eec2
Added to database: 10/19/2026, 21:34:12 UTC
Last enriched: 10/19/2026, 21:48:15 UTC
Last updated: 10/19/2026, 22:04:15 UTC
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.