Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.4%top 63%

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

0
High
VulnerabilityCVE-2026-59197cvecve-2026-59197cwe-787cwe-190
Published: 07/14/2026 (07/14/2026, 16:25:23 UTC)
Source: CVE Database V5
Vendor/Project: python-pillow
Product: Pillow

Description

Pillow is a Python imaging library. Prior to 12.3.0, Pillow's public rank-filter API can trigger a native heap out-of-bounds write when given a very large odd filter size because ImageFilter.RankFilter.filter() calls image.expand(size // 2, size // 2) before rank-filter size validation and ImagingExpand() computes output dimensions with unchecked signed int arithmetic. This issue is fixed in version 12.3.0.

CVSS v3.1

Score 8.2high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H

Affected software

pillow
pkg:pypi/pillow
Affected versions
<12.3.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: 07/21/2026, 20:08:19 UTC

Technical Analysis

Pillow versions before 12.3.0 contain a vulnerability in the ImageFilter.RankFilter.filter() function. When invoked with a very large odd filter size, the function calls image.expand(size // 2, size // 2) before validating the rank-filter size. The underlying ImagingExpand() function computes output dimensions using unchecked signed integer arithmetic, which can cause a native heap out-of-bounds write (CWE-787). This flaw can lead to memory corruption and potentially denial of service or other impacts. The issue is resolved in Pillow 12.3.0.

Potential Impact

The vulnerability allows an attacker to trigger a native heap out-of-bounds write, which can cause memory corruption. According to the CVSS vector, it requires no privileges or user interaction and can be exploited remotely over the network. The impact includes integrity loss and high availability impact, potentially leading to application crashes or denial of service.

Mitigation Recommendations

Upgrade to Pillow version 12.3.0 or later, where this vulnerability is fixed. No other mitigations are indicated. Patch status is confirmed by the vendor advisory stating the issue is fixed in 12.3.0.

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-07-02T19:53:48.831Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 6a56684768715ace43dcfe94

Added to database: 07/14/2026, 16:48:07 UTC

Last enriched: 07/21/2026, 20:08:19 UTC

Last updated: 08/27/2026, 22:52:12 UTC

Views: 54

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