Description
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.
Published: 2026-10-19
Score: 8.7 High
EPSS: n/a
KEV: No
Impact: Out-of-bounds memory access causing process crash (Denial of Service).
Action: Immediate Patch
AI Analysis

Impact

Pillow's morphology routine, ImageMorph.MorphOp.apply(), performs an out-of-bounds read on a zero-width image. Attackers can craft a PPM or PGM file with a width of zero and supply it to any application that processes images using Pillow. The library then attempts to read beyond the bounds of the row buffer, causing a crash. This vulnerability leads to a denial of service but does not provide code execution or data exfiltration.

Affected Systems

Python Pillow (pillow) is affected. All releases prior to version 13.0.0 are vulnerable. Upgrading to Pillow 13.0.0 or later resolves the issue.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. No EPSS score is available, and the vulnerability is not listed in CISA’s KEV catalog. The attack vector requires an attacker to deliver a malicious image to an application that calls MorphOp.apply(). If the application is exposed to untrusted input (e.g., a web upload), the exploit can be performed remotely. Even in a local context, the crash can be triggered by an attacker with access to the image file. The vulnerability is therefore considered high risk due to the likelihood of widespread use of Pillow and the potential for denial of service.

Generated by OpenCVE AI on October 20, 2026 at 00:19 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 13.0.0 or later to apply the vendor fix.
  • Validate image dimensions before invoking MorphOp.apply(), rejecting any images with zero width or other invalid geometry.
  • Patch or reconfiguring applications that use legacy Pillow versions to eliminate calls to MorphOp.apply() for untrusted images.

Generated by OpenCVE AI on October 20, 2026 at 00:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 20 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-124
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Important


Mon, 19 Oct 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow

Mon, 19 Oct 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 19 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Pillow: Out-of-bounds access in _imagingmorph on a zero-width image
Weaknesses CWE-787
References
Metrics cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-19T21:38:18.176Z

Reserved: 2026-10-19T16:58:51.959Z

Link: CVE-2026-112397

cve-icon Vulnrichment

Updated: 2026-10-19T21:38:13.055Z

cve-icon NVD

Status : Received

Published: 2026-10-19T22:17:06.970

Modified: 2026-10-19T22:17:06.970

Link: CVE-2026-112397

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-19T21:17:35Z

Links: CVE-2026-112397 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T00:30:07Z

Weaknesses
  • CWE-124

    Buffer Underwrite ('Buffer Underflow')

  • CWE-787

    Out-of-bounds Write