Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Pillow
  4. ›
  5. CVE-2026-112398

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

October 23, 2026

A heap buffer overflow in Pillow’s FlashPix (FPX) JPEG-tile decoder lets an attacker achieve arbitrary code execution by getting an application to open a single crafted file with Image.open(). The file is recognized by content (the OLE2 magic), not by extension, so any service that opens or thumbnails untrusted uploads with the optional olefile dependency installed is reachable with no user interaction. In the PoC below, opening one crafted file executes an attacker-chosen command on stock Pillow 12.2.0 (x86_64 Ubuntu 24.04, glibc 2.39).

References

  • github.com/advisories/GHSA-5x8w-8jj5-q52h
  • github.com/python-pillow/Pillow/commit/242a059aedc1935097d9aa1dc3f099750467ba75
  • github.com/python-pillow/Pillow/releases/tag/13.0.0
  • github.com/python-pillow/Pillow/security/advisories/GHSA-5x8w-8jj5-q52h
  • nvd.nist.gov/vuln/detail/CVE-2026-112398

Code Behaviors & Features

Detect and mitigate CVE-2026-112398 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 13.0.0

Fixed versions

  • 13.0.0

Solution

Upgrade to version 13.0.0 or above.

Impact 8.1 HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-122: Heap-based Buffer Overflow
  • CWE-787: Out-of-bounds Write

Source file

pypi/Pillow/CVE-2026-112398.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:26 +0000.