CVE-2026-112403 Pillow: Heap buffer overflow in ImagingJpegDecode
Heap buffer overflow in Pillow's JPEG decoder allows attackers to corrupt memory, crash the process, or execute code via crafted images.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-112403?
CVE-2026-112403 is a critical memory corruption vulnerability in Python Pillow, published on 19 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-122
Which versions are affected by CVE-2026-112403?
4 open source packages ship an affected version, including pillow and Pillow. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | All versions | 13.0.0 |
pillow PyPI | All versions | 13.0.0 |
pillow PyPI | All versions | 13.0.0 |
Pillow PyPI | All versions | 13.0.0 |
Products include Python Pillow.
How do I fix CVE-2026-112403?
Upgrade pillow to 13.0.0 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-112403 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-112403 exists.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in Python Pillow
Sources
Also known as BIT-pillow-2026-112403, DEBIAN-CVE-2026-112403, ECHO-7dc8-65d8-fff5, GHSA-8g5g-8vmr-9782, PYSEC-2026-4332, ROOT-APP-PYPI-CVE-2026-112403 and 1 more.