Zero Radar
← feed
HighVulnerabilityGHSA-78g4-xqwv-q3g8updated 25 Oct 2026, 13:32 UTC

Pillow image library can be crashed or hijacked by a crafted JPEG 2000 file

Pillow is a popular Python library for opening images. A specially crafted JPEG 2000 image can corrupt memory while Pillow loads it, which can crash the program or possibly let an attacker run their own code.

Fixed in pillow 13.0.0Official source
SeverityHighCVSS 8.1 of 10
Being exploited?UnclearNo reports either way yet
Fix available?Yespillow 13.0.0 · since 25 Oct 2026
How sure is this?Official sourceBacked by an official source

How the attack works simplified

  1. 1Crafted imageAttacker builds a malicious JPEG 2000 file
  2. 2Upload or downloadFile reaches your app as normal input
  3. 3Pillow loads itImage.open and load parse the file
  4. 4Memory overwrittenHeap buffer overflow write in OpenJPEG
  5. 5Crash or takeoverProgram crashes or attacker gains control
  6. ResultAttacker may crash or control the process

What happened

The bundled OpenJPEG library inside Pillow wheels 11.1.0 through 12.3.0 has a heap-buffer-overflow write in opj_j2k_read_sod, reached via an unchecked TPsot index when a valid TLM marker is combined with TNsot=0. The fix exists on OpenJPEG master but no OpenJPEG release includes it.

Why it is dangerous: Anyone who opens untrusted images with Pillow's default settings (Image.open then im.load) can be affected, which includes web services that process user uploads.

Are you affected?

You are affected if you use Pillow 11.1.0 up to but not including 13.0.0 (wheels bundling OpenJPEG 2.5.3 or 2.5.4) and open JPEG 2000 images from untrusted sources.

Package / productAffected versionsFixed in
pillow · pip>= 11.1.0, < 13.0.013.0.0

What to do

  1. Upgrade Pillow to 13.0.0 or later
  2. If you cannot upgrade yet, do not open untrusted JPEG 2000 (.jp2/.j2k) images with Pillow
  3. Check your installed version with: pip show pillow

Timeline

  1. 22 Oct 2026, 17:01 UTC
    Publicly disclosed
  2. 22 Oct 2026, 17:01 UTC
    Reported by GitHub Advisory · GitHub Advisory

Sources 1 report, oldest first

Official vendor, government CERT or advisory database

Technical details

ID
GHSA-78g4-xqwv-q3g8
CVSS
8.1 / 10
Disclosed
22 Oct 2026, 17:01 UTC
On Zero Radar
before the radar started
Last change
25 Oct 2026, 13:32 UTC

The plain-language parts and the attack diagram were written by an AI model (anthropic/claude-haiku-5.5) from the sources above. Facts like versions, exploitation and dates come from the sources themselves. How Zero Radar works

Pillow image library can be crashed or hijacked by a crafted JPEG 2000 file · Zero Radar