
PEACH
Un framework di isolamento del tenant
CVE-2026-59199 is a heap out-of-bounds write vulnerability in Pillow, the Python imaging library, caused by signed 32-bit integer overflow in image coordinate arithmetic. When coordinates near the signed 32-bit integer limits are passed to Image.paste(), Image.crop(), or Image.alpha_composite(), the native C extension performs arithmetic that wraps around, bypassing bounds checks and triggering a backward heap underwrite. All Pillow versions prior to 12.3.0 are affected. The vulnerability was disclosed on July 14, 2026, with a fix merged on June 22, 2026, and released in Pillow 12.3.0. It carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).
The root cause is an integer overflow (CWE-190) in src/libImaging/Paste.c, where the box dimensions are computed as xsize = dx1 - dx0 and ysize = dy1 - dy0 using signed int arithmetic. When an attacker supplies coordinates such as dx0 = 2147483646 and dx1 = -2147483648, the subtraction wraps around to a small positive value that matches the source image dimensions, causing the subsequent bounds checks to pass incorrectly. The paste loop then computes a negative destination offset (multiplied by pixelsize), resulting in a memcpy writing attacker-controlled pixel bytes before the destination row allocation — a backward heap underwrite (CWE-787). The write offset and length both scale with the attacker-controlled source image width: for RGBA mode with width W, the write is 4*W bytes starting 4*W bytes before the destination row pointer, with a theoretical maximum of ~2 GiB. The same sink is reachable via Image.crop() (through ImagingCrop → ImagingPaste) and Image.alpha_composite() (via its internal crop). No private APIs, malformed image files, or special privileges are required — only the ability to supply crafted coordinate values to these public APIs (GitHub Advisory, Fix PR).
Successful exploitation primarily causes a denial of service: on standard Pillow builds, the heap corruption from the out-of-bounds write results in process abort with double free or corruption (out). In theory, the controlled backward heap underwrite — where attacker-supplied pixel data is written to arbitrary heap memory — could be leveraged for memory corruption beyond a crash, though no remote code execution has been demonstrated publicly. Applications that accept untrusted image coordinates (e.g., user-supplied crop boxes, paste positions, or overlay destinations) are directly at risk. The confidentiality and integrity impacts are rated None in the CVSS scoring, with availability impact rated High (GitHub Advisory).
Image.paste(), Image.crop(), or Image.alpha_composite() — for example, a web service that allows users to specify crop or overlay positions.Image.paste(), use a box such as ((1 << 31) - W, 0, -(1 << 31), 1) where W is the width of the source image (e.g., W=2 gives (2147483646, 0, -2147483648, 1)).Image.frombytes('RGBA', (W, 1), payload_bytes)).dst.paste(src, box). The C layer computes xsize = dx1 - dx0, which wraps to W due to signed integer overflow, bypassing the size mismatch check.dx * pixelsize = -4*W), and memcpy writes 4*W attacker-controlled bytes starting 4*W bytes before the destination row pointer, corrupting the heap.double free or corruption (out) during cleanup, achieving denial of service. Under ASAN, the signature is heap-buffer-overflow WRITE in ImagingPaste (GitHub Advisory).double free or corruption (out) or Aborted (core dumped) originating from Pillow image operations; ASAN reports showing heap-buffer-overflow WRITE in ImagingPaste at src/libImaging/Paste.c.Upgrade Pillow to version 12.3.0 or later, which fixes the vulnerability by changing the dimension calculation variables xsize and ysize in src/libImaging/Paste.c from int to int64_t, preventing signed integer overflow (Fix Commit, Release 12.3.0). If immediate patching is not possible, restrict image coordinate inputs at the application layer to exclude values near the signed 32-bit integer limits (approximately ±2,147,483,648) before passing them to Pillow APIs. Input validation should reject any coordinate tuple where the computed width or height would overflow a 32-bit signed integer.
Fonte: Questo report è stato generato utilizzando l'intelligenza artificiale
Valutazione gratuita delle vulnerabilità
Valuta le tue pratiche di sicurezza cloud in 9 domini di sicurezza per confrontare il tuo livello di rischio e identificare le lacune nelle tue difese.
Richiedi una demo personalizzata
"La migliore esperienza utente che abbia mai visto offre piena visibilità ai carichi di lavoro cloud."
"Wiz fornisce un unico pannello di controllo per vedere cosa sta succedendo nei nostri ambienti cloud."
"Sappiamo che se Wiz identifica qualcosa come critico, in realtà lo è."