Out-of-bounds Write Affecting pillow package, versions <7.0.0-4ubuntu0.9+esm2


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.53% (46th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU2004-PILLOW-21485877
  • published4 Nov 2026
  • disclosed19 Oct 2026

Introduced: 19 Oct 2026

CVE-2026-112397  (opens in a new tab)
CWE-787  (opens in a new tab)

How to fix?

Upgrade Ubuntu:20.04 pillow to version 7.0.0-4ubuntu0.9+esm2 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream pillow package and not the pillow package as distributed by Ubuntu. See How to fix? for Ubuntu:20.04 relevant fixed versions and status.

Pillow is a Python imaging library. Prior to 13.0.0, Pillow's ImageMorph.MorphOp.apply() can access memory before a row buffer for a zero-width image. PPM and PGM input can create an image with width zero, and the native morphology routine indexes outrow[width - 1] without rejecting that geometry. An attacker can supply such an image to an application that applies a morphology operation. This can crash the process. This issue is fixed in version 13.0.0.

CVSS Base Scores

version 3.1