CVE-2026-112403
published 2026-10-19CVE-2026-112403: Pillow is a Python imaging library. Prior to 13.0.0, Pillow's JPEG decoder can write a full-width scanline into a buffer sized for a requested draft scale…
PriorityP358critical9.2CVSS 4.0
AVNACHATNPRNUINVCHVIHVAHSCNSINSANEXCRXIRXARXMAVXMACXMATXMPRXMUIXMVCXMVIXMVAXMSCXMSIXMSAXSXAUXRXVXREXUX
EPSS
0.77%
55.4th percentile
Pillow is a Python imaging library. Prior to 13.0.0, Pillow's JPEG decoder can write a full-width scanline into a buffer sized for a requested draft scale. ImagingJpegDecode does not verify libjpeg's actual output width and component count after scaling is requested, and an 8-bit lossless SOF3 JPEG decoded by a build linked to libjpeg-turbo 3.x can ignore the requested downscaling geometry. An attacker can supply such a JPEG to an application that uses draft() or thumbnail() to request downscaling. This can corrupt heap memory, crash the process, or potentially allow code execution. Older libjpeg-turbo 2.x and IJG builds reject the SOF3 input. This issue is fixed in version 13.0.0.
Affected
2 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| python-pillow | pillow | < 13.0.0 | 13.0.0 |
| python | pillow | >= 0 < 13.0.0 | 13.0.0 |
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
Pillow: Heap buffer overflow in ImagingJpegDecode
ghsa·2026-10-20
CVE-2026-112403 [CRITICAL] CWE-122 Pillow: Heap buffer overflow in ImagingJpegDecode
Pillow: Heap buffer overflow in ImagingJpegDecode
## Summary
`JpegImageFile.draft()` — which `Image.thumbnail()` calls automatically — requests 1/2, 1/4 or 1/8 scaled JPEG output and shrinks `self._size` and the tile extents to match, so `_setimage()` allocates a single-row decode buffer of `ceil(W/s)` samples. `ImagingJpegDecode()` sets `cinfo.scale_num`/`scale_denom`, calls `jpeg_start_decompress()`, and then reads scanlines into that buffer without ever comparing `cinfo.output_width`, `cinfo.output_height` or `cinfo.out_color_components` against `state->xsize`, `state->ysize` and `state->bits`.
libjpeg-turbo 3.x decodes lossless (SOF3) JPEG, but hardwires lossless streams to no scaling — the requested `scale_denom` is silently discarded. It therefore returns full-width `W`-sample row
VulDB
python-pillow Pillow up to 12.x JPEG decoder ImagingJpegDecode buffer overflow
vuldb·2026-10-20·CVSS 9.2
CVE-2026-112403 [CRITICAL] python-pillow Pillow up to 12.x JPEG decoder ImagingJpegDecode buffer overflow
A vulnerability classified as critical has been found in python-pillow Pillow up to 12.x. The impacted element is the function ImagingJpegDecode of the component JPEG decoder. The manipulation leads to buffer overflow.
This vulnerability is documented as CVE-2026-112403. The attack can be initiated remotely. There is not any exploit available.
It is recommended to upgrade the affected component.
No detection rules found.
No public exploits indexed.
https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75https://github.com/python-pillow/Pillow/releases/tag/13.0.0https://github.com/python-pillow/Pillow/security/advisories/GHSA-8g5g-8vmr-9782https://github.com/python-pillow/Pillow/security/advisories/GHSA-8g5g-8vmr-9782
2026-10-19
Published