CVE-2026-59204: CWE-789: Memory Allocation with Excessive Size Value in python-pillow Pillow
Pillow is a Python imaging library. From 8.2.0 through 12.2.0, src/libImaging/Jpeg2KDecode.c accumulates total_component_width across every tile in a JPEG2000 image instead of recomputing it per tile, allowing a crafted tiled JPEG2000 file to force substantially higher transient memory usage and trigger out-of-memory failures during decoding. This 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 but not including 12.3.0. The flaw exists in the JPEG2000 decoding component (src/libImaging/Jpeg2KDecode.c), where total_component_width is accumulated across every tile instead of being recomputed per tile. This causes excessive memory allocation when processing crafted tiled JPEG2000 images, potentially leading to out-of-memory conditions during image decoding. The vulnerability is identified as CWE-789 (Memory Allocation with Excessive Size Value).
Potential Impact
An attacker can supply a specially crafted tiled JPEG2000 image that triggers excessive memory allocation during decoding, causing the application to consume substantially more memory than expected. This can lead to out-of-memory failures, potentially causing denial of service or application instability. There is no indication of code execution or data corruption from the provided data.
Mitigation Recommendations
This vulnerability is fixed in Pillow version 12.3.0. Users should upgrade to version 12.3.0 or later to remediate this issue. No other official remediation or temporary fixes are indicated. Patch status is confirmed by the vendor advisory stating the fix is included in version 12.3.0.
CVE-2026-59204: CWE-789: Memory Allocation with Excessive Size Value in python-pillow Pillow
Description
Pillow is a Python imaging library. From 8.2.0 through 12.2.0, src/libImaging/Jpeg2KDecode.c accumulates total_component_width across every tile in a JPEG2000 image instead of recomputing it per tile, allowing a crafted tiled JPEG2000 file to force substantially higher transient memory usage and trigger out-of-memory failures during decoding. This 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 but not including 12.3.0. The flaw exists in the JPEG2000 decoding component (src/libImaging/Jpeg2KDecode.c), where total_component_width is accumulated across every tile instead of being recomputed per tile. This causes excessive memory allocation when processing crafted tiled JPEG2000 images, potentially leading to out-of-memory conditions during image decoding. The vulnerability is identified as CWE-789 (Memory Allocation with Excessive Size Value).
Potential Impact
An attacker can supply a specially crafted tiled JPEG2000 image that triggers excessive memory allocation during decoding, causing the application to consume substantially more memory than expected. This can lead to out-of-memory failures, potentially causing denial of service or application instability. There is no indication of code execution or data corruption from the provided data.
Mitigation Recommendations
This vulnerability is fixed in Pillow version 12.3.0. Users should upgrade to version 12.3.0 or later to remediate this issue. No other official remediation or temporary fixes are indicated. Patch status is confirmed by the vendor advisory stating the fix is included in version 12.3.0.
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/21/2026, 20:08:26 UTC
Last updated: 08/26/2026, 04:42:03 UTC
Views: 62
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.