CVE-2026-59204: CWE-789: Memory Allocation with Excessive Size Value in python-pillow Pillow
A vulnerability in the Pillow Python imaging library versions 8.2.0 through 12.2.0 allows crafted JPEG2000 images with tiled components to cause excessive memory allocation during decoding. This occurs because the total_component_width is accumulated across all tiles instead of being recalculated per tile, leading to out-of-memory failures. The issue is fixed in version 12.3.0.
AI Analysis
Technical Summary
CVE-2026-59204 is a high-severity vulnerability in the Pillow library affecting versions from 8.2.0 up to 12.2.0. The flaw exists in the JPEG2000 decoding code (src/libImaging/Jpeg2KDecode.c), where the total_component_width is incorrectly accumulated across every tile rather than recalculated for each tile. This miscalculation can cause the library to allocate substantially more memory than intended when processing crafted tiled JPEG2000 images, potentially leading to out-of-memory conditions and application failures. The vulnerability is addressed in Pillow version 12.3.0.
Potential Impact
An attacker can supply a specially crafted tiled JPEG2000 image that triggers excessive memory allocation during decoding, causing out-of-memory failures. This can lead to denial of service by crashing the application using the vulnerable Pillow versions. There is no indication of code execution or data corruption from the provided data.
Mitigation Recommendations
Upgrade to Pillow version 12.3.0 or later, where this issue is fixed. Patch status is confirmed by the vendor advisory indicating the fix in 12.3.0. No other mitigations are specified or required.
CVE-2026-59204: CWE-789: Memory Allocation with Excessive Size Value in python-pillow Pillow
Description
A vulnerability in the Pillow Python imaging library versions 8.2.0 through 12.2.0 allows crafted JPEG2000 images with tiled components to cause excessive memory allocation during decoding. This occurs because the total_component_width is accumulated across all tiles instead of being recalculated per tile, leading to out-of-memory failures. The issue is fixed in version 12.3.0.
CVSS v4.0
Score 8.7high
Affected software
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
CVE-2026-59204 is a high-severity vulnerability in the Pillow library affecting versions from 8.2.0 up to 12.2.0. The flaw exists in the JPEG2000 decoding code (src/libImaging/Jpeg2KDecode.c), where the total_component_width is incorrectly accumulated across every tile rather than recalculated for each tile. This miscalculation can cause the library to allocate substantially more memory than intended when processing crafted tiled JPEG2000 images, potentially leading to out-of-memory conditions and application failures. The vulnerability is addressed in Pillow version 12.3.0.
Potential Impact
An attacker can supply a specially crafted tiled JPEG2000 image that triggers excessive memory allocation during decoding, causing out-of-memory failures. This can lead to denial of service by crashing the application using the vulnerable Pillow versions. There is no indication of code execution or data corruption from the provided data.
Mitigation Recommendations
Upgrade to Pillow version 12.3.0 or later, where this issue is fixed. Patch status is confirmed by the vendor advisory indicating the fix in 12.3.0. No other mitigations are specified or required.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-02T21:05:02.923Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a565a3d68715ace43c7b717
Added to database: 07/14/2026, 15:48:13 UTC
Last enriched: 07/14/2026, 16:05:25 UTC
Last updated: 07/14/2026, 16:54:55 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.