CVE-2026-112397: CWE-787: Out-of-bounds Write in python-pillow 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
Affected software
python-pillow
Pillow
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.