Skip to main content

CVE-2026-112397: CWE-787: Out-of-bounds Write in python-pillow Pillow

0
High
VulnerabilityCVE-2026-112397cvecve-2026-112397cwe-787
Published: 10/19/2026 (10/19/2026, 21:17:35 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: Pillow

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.

CVSS v4.0

Score 8.7high

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

python-pillow

Pillow

Affected versions
<13.0.0
pillow
pkg:pypi/pillow
Affected versions
<13.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/19/2026, 21:48:26 UTC

Technical Analysis

CVE-2026-112397 describes an out-of-bounds write vulnerability (CWE-787) in the python-pillow library's ImageMorph.MorphOp.apply() method. When processing PPM or PGM images with zero width, the native morphology routine indexes memory at outrow[width - 1] without validating that the width is non-zero, leading to memory access before the buffer. This can cause a crash of the process using Pillow. The vulnerability affects all Pillow versions prior to 13.0.0 and is resolved in version 13.0.0.

Potential Impact

An attacker can supply a crafted PPM or PGM image with zero width to an application using Pillow's morphology operation, causing an out-of-bounds memory write that results in a process crash. There is no indication of code execution or privilege escalation, but denial of service via application crash is possible.

Mitigation Recommendations

Upgrade to Pillow version 13.0.0 or later, where this vulnerability is fixed. No other mitigations are indicated or necessary.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-10-19T16:58:51.959Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6ad68cd42cdf04f65692eebd

Added to database: 10/19/2026, 21:34:12 UTC

Last enriched: 10/19/2026, 21:48:26 UTC

Last updated: 10/19/2026, 22:04:15 UTC

Views: 6

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses