# CVE-2026-112398: Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution

- Severity: Critical 9.2 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.70%, higher than 54% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-10-19T21:07:25.229Z
- Modified: 2026-11-17T13:30:22.878Z
- Also known as: GHSA-5x8w-8jj5-q52h, BIT-PILLOW-2026-112398, PYSEC-2026-4330
- Weaknesses: CWE-122, CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's FlashPix JPEG-tile decoder can write decoded scanlines beyond the allocated tile buffer. FlashPix (FPX) JPEG decoding selects raw mode LA with two bytes per pixel, while an unrecognized JPEG mode can be decoded as JCS_UNKNOWN with four components, causing ImagingJpegDecode to write four-component scanlines into the two-byte tile buffer. An attacker can supply a crafted OLE2 FlashPix file to an application with the optional olefile dependency installed that opens or thumbnails untrusted input. This can corrupt heap memory and may allow arbitrary code execution. This issue is fixed in version 13.0.0.

(As written by CVE List.)

## Affected

- python-pillow Pillow: < 13.0.0
- pillow (PyPI): before 13.0.0
- python pillow: before 13.0.0
- pillow (Bitnami): before 13.0.0

## Every score

- GitHub_M: CVSS:4.0 9.2 Critical `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Critical `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating Critical

## References

- <https://github.com/python-pillow/Pillow/security/advisories/GHSA-5x8w-8jj5-q52h> (exploit, advisory, evidence, vendor-advisory, web)
- <https://github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/releases/tag/13.0.0> (advisory, article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-112398> (advisory, web)
- <https://github.com/python-pillow/Pillow> (package)

## Sources

- CVE List: [CVE-2026-112398](https://www.cve.org/CVERecord?id=CVE-2026-112398), CVE Terms of Use, modified 2026-10-22
- GitHub Advisory Database: [GHSA-5x8w-8jj5-q52h](https://github.com/advisories/GHSA-5x8w-8jj5-q52h), CC-BY-4.0, modified 2026-10-28
- NVD: [CVE-2026-112398](https://nvd.nist.gov/vuln/detail/CVE-2026-112398), Public domain, modified 2026-10-27
- PyPA Advisory Database: [PYSEC-2026-4330](https://osv.dev/vulnerability/PYSEC-2026-4330), CC-BY-4.0, modified 2026-10-28
- Bitnami Vulnerability Database: [BIT-PILLOW-2026-112398](https://osv.dev/vulnerability/BIT-PILLOW-2026-112398), Apache-2.0, modified 2026-11-17

---

Page: https://cve.day/CVE-2026-112398 · Whole record: https://cve.day/CVE-2026-112398.json · Rebuilt by cve.day 2026-11-25T22:59:45.945Z
