Intel

AIKIDO-2026-455429

pillow is vulnerable to Heap-based Buffer Overflow

CVE-2026-112398Published Oct 20, 2026
October 20, 2026

92

CVE Score

Critical

Heap-based Buffer Overflow

Are you affected? Scan for Free

TL;DR

FpxImagePlugin decodes a JPEG-compressed FlashPix tile as raw mode LA, which allocates two bytes per pixel, while an unrecognized JPEG mode is decoded as JCS_UNKNOWN and writes one byte per component. A four-component scanline therefore writes past the tile buffer. Opening a crafted OLE2 FlashPix file when olefile is installed can corrupt heap memory and run code. The fix rejects a scanline whose width or component count does not fit the allocated tile buffer before decoding it.

How do I fix this?

Upgrade the pillow library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you open untrusted images with the optional olefile dependency installed.

Package

Versions

1.0 - 12.3.0

Fixed in 13.0.0

Background info

pillow is vulnerable to Heap-based Buffer Overflow in versions 1.0 - 12.3.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea