Description
Pillow is a Python imaging library. Prior to 12.3.0, Pillow public image coordinate APIs can trigger a native heap out-of-bounds write when given coordinates near the signed 32-bit integer limits in Image.paste(), Image.crop(), or Image.alpha_composite(). This issue is fixed in version 12.3.0.
Published: 2026-07-14
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Pillow is a widely used Python imaging library that exposes native C APIs for operations such as Image.paste(), Image.crop(), and Image.alpha_composite(). The CVE details a signed 32‑bit integer coordinate overflow that can trigger a native heap out‑of‑bounds write when these functions are called with coordinates near the signed 32‑bit limit. While the CVE text does not describe any subsequent exploitation, it is inferred that such a memory corruption could be leveraged for arbitrary code execution or other malicious actions if the application were to run with elevated privileges, or could lead to a denial‑of‑service. The vulnerability is classified under CWE‑190 (Integer Overflow or Wraparound) and CWE‑787 (Out‑of‑Bounds Write).

Affected Systems

All releases of the Pillow library made by the Python Pillow project that are older than version 12.3.0 are vulnerable. The issue can be triggered in any Python application that uses Image.paste(), Image.crop() or Image.alpha_composite() with coordinate values that approach the signed 32-bit integer limit. Pillow is commonly incorporated into web servers, content management systems, photo editors, and other image-handling tools, so the impact could span a large set of deployed software. The fix is incorporated in Pillow 12.3.0, which disables the vulnerable code path and validates coordinates against the 32‑bit boundary.

Risk and Exploitability

The CVSS score of 7.5 indicates high severity, and the EPSS score of less than 1% suggests that exploitation is currently rare. The vulnerability is not listed in the CISA KEV catalog. The CVE information indicates that the overflow is triggered by the library’s native code, so the attack vector is inferred to require control over the image data passed to the vulnerable functions. If an attacker can supply images containing near‑limit coordinates, the overflow could be triggered. Because the CVSS metric does not specify remote or local vectors, the exact ease of exploitation remains uncertain; nevertheless, the potential for heap corruption and the high severity score warrant prompt attention.

Generated by OpenCVE AI on July 31, 2026 at 10:03 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 12.3.0 or newer in all affected installations.
  • Pin your project’s Pillow dependency to a fixed version 12.3.0 or higher to prevent accidental downgrades.
  • Validate any coordinate values supplied to Image.paste(), Image.crop() or Image.alpha_composite() to ensure they remain well within the signed 32‑bit range before calling the library.
  • Monitor image processing endpoints for anomalous coordinate values or crashes that may indicate an attempted exploitation.

Generated by OpenCVE AI on July 31, 2026 at 10:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-6r8x-57c9-28j4 Pillow: Heap out-of-bounds write `Image.paste()` / `Image.crop()` via signed coordinate overflow
History

Thu, 16 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Important


Thu, 16 Jul 2026 04:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 14 Jul 2026 18:00:00 +0000

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

Tue, 14 Jul 2026 16:15:00 +0000

Type Values Removed Values Added
Description Pillow is a Python imaging library. Prior to 12.3.0, Pillow public image coordinate APIs can trigger a native heap out-of-bounds write when given coordinates near the signed 32-bit integer limits in Image.paste(), Image.crop(), or Image.alpha_composite(). This issue is fixed in version 12.3.0.
Title Pillow: Heap out-of-bounds write `Image.paste()` / `Image.crop()` via signed coordinate overflow
Weaknesses CWE-190
CWE-787
References
Metrics 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'}


Subscriptions

Python-pillow Pillow
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-15T14:53:39.590Z

Reserved: 2026-07-02T19:53:48.831Z

Link: CVE-2026-59199

cve-icon Vulnrichment

Updated: 2026-07-15T14:53:03.182Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-14T15:42:15Z

Links: CVE-2026-59199 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T10:15:06Z

Weaknesses