Pillow: heap buffer overflow in FlashPix (FPX) JPEG decoding lets one crafted image run code (CVE-2026-112398)
Pillow (Python imaging library)
Sponsored
Brought to you byTinkerer Club
The private club for people who own their servers, run their own AI, and pay $0/month for software.
A heap buffer overflow in Pillow's FlashPix (FPX) JPEG-tile decoder lets an attacker run code by getting an application to open a single crafted file with Image.open(). Pillow detects FPX files by their OLE2 content, not their extension, so any service that opens or thumbnails untrusted uploads with the optional olefile package installed can be hit with no user interaction. The advisory includes a working proof of concept (shown on Pillow 12.2.0 with ASLR disabled). Pillow 12.3.0 and earlier are affected; upgrade to 13.0.0. GitHub rates it critical (CVSS 4.0 score 9.2). The same 13.0.0 release (Oct 16) also fixes other critical bugs: CVE-2026-112900, where an EPS filename starting with - or @ is passed to Ghostscript as an option and can lead to code execution (2.6.0 through 12.3.0); CVE-2026-112393, a heap overflow when saving TIFF to BytesIO (public reproducer); and CVE-2026-112403, a JPEG heap overflow with draft()/thumbnail() on libjpeg-turbo 3.x builds.
Why this severity: CVSS 4.0 9.2 per GitHub for CVE-2026-112398 (needs the optional olefile package); CVE-2026-112900, -112393 and -112403 are also rated critical
- Started
- Oct 23, 2026
Affected
- pillow <= 12.3.0
Fixed in
- pillow 13.0.0
Timeline3
Pillow publishes GHSA-5x8w-8jj5-q52h (CVE-2026-112398) with a proof of concept; the fix ships in Pillow 13.0.0.
GitHub publishes GHSA-w889-685w-c8fh (CVE-2026-112900): attacker-controlled EPS filenames beginning with - or @ are parsed as Ghostscript options, potentially RCE even with -dSAFER; fixed in 13.0.0.
Pillow 13.0.0 is released with fixes for several critical bugs, including CVE-2026-112900 (Ghostscript argument injection via EPS filenames), CVE-2026-112393 (TIFF save to BytesIO heap overflow) and CVE-2026-112403 (JPEG draft-scale heap overflow).
Advisories8
- GHSA-5x8w-8jj5-q52h: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code executionpython-pillow/Pillow · Oct 23, 2026
- GHSA-5x8w-8jj5-q52hGitHub Advisory Database · Oct 23, 2026
- CVE-2026-112398NVD
- Pillow 13.0.0 releasepython-pillow/Pillow
- GHSA-w889-685w-c8fh: Argument Injection in Ghostscript call, potentially leading into RCE (CVE-2026-112900)python-pillow/Pillow
- GHSA-332p-7hrc-92wf: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO (CVE-2026-112393)GitHub Advisory Database
- GHSA-8g5g-8vmr-9782: JPEG decoder buffer overflow (CVE-2026-112403)python-pillow/Pillow
- Pillow 13.0.0 release notes (security section)Pillow · Oct 16, 2026
Get an email when a new major security incident drops. No spam, unsubscribe any time.