CVE-2026-54058

Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files)

Published Jul 14, 2026 CVSS 4.0 · 8.3 High EPSS < 1% KEV · Not listed
Description
Pillow is a Python imaging library. Prior to 12.3.0, when Pillow loads an uncompressed McIdas AREA image from a filename through the mmap raw codec path, attacker-controlled header words can set a row stride smaller than the natural row width, causing pixel access such as Image.tobytes(), getpixel, convert, or save to read beyond the mapped region and disclose adjacent process memory or fault. This issue is fixed in version 12.3.0.

Analysis

AI-generated

Technical impact

Pillow’s mmap raw codec path, used to load uncompressed McIdas AREA images, performs an out‑of‑bounds read when the header supplies a row stride that is smaller than the natural row width. Functions such as Image.tobytes(), getpixel, convert, or save then access data beyond the mapped region, potentially reading adjacent memory or triggering a fault. This flaw is a classic buffer over‑read, classified as CWE‑125, and can leak sensitive data from the process’s address space but does not provide code execution.

Affected Systems

The vulnerable product is Pillow, the Python imaging library. Any release prior to version 12.3.0 that supports the mmap raw codec for McIdas AREA files is affected. Applications that load user‑controlled or externally supplied images with Pillow in those versions are at risk; Pillow 12.3.0 and later enforce proper bounds checking and are not impacted.

Risk and Exploitability

With a CVSS score of 8.3, the vulnerability is considered high severity. The EPSS score of < 1% indicates a low likelihood of exploitation under current conditions, and the flaw is not listed in CISA’s KEV catalog. Based on the description, it is inferred that the attack requires the adversary to supply a crafted McIdas AREA file to an application that uses Pillow; if the application accepts images from remote users, this can occur remotely. The attack does not grant code execution but can expose process memory or crash the application.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pillow to version 12.3.0 or later to apply the upstream fix.
  • If upgrading is not feasible, apply the upstream patch referenced in the GitHub commit 6a8de891fb00968e5ea79bfa84368ed90b3cfc1d.
  • Disable or restrict use of the mmap raw codec for McIdas AREA files in the application, or validate and sanitize header values before loading the image.

Generated by OpenCVE AI on July 31, 2026 at 09:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-62p4-gmf7-7g93 Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files)
Ubuntu USN Ubuntu USN USN-8999-1 Pillow vulnerabilities
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Python-pillow
Python-pillow pillow
Vendors & Products Python-pillow
Python-pillow pillow
Type Values Removed Values Added
Description Pillow is a Python imaging library. Prior to 12.3.0, when Pillow loads an uncompressed McIdas AREA image from a filename through the mmap raw codec path, attacker-controlled header words can set a row stride smaller than the natural row width, causing pixel access such as Image.tobytes(), getpixel, convert, or save to read beyond the mapped region and disclose adjacent process memory or fault. This issue is fixed in version 12.3.0.
Title Pillow: Out-of-bounds read via attacker-controlled row stride on Pillow's mmap path (McIdas AREA files)
Weaknesses CWE-125
References
Metrics cvssV4_0

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

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 14, 2026, 5:54 PM
Reserved
Jun 11, 2026, 6:24 PM
Status
Analyzed
Published
Jul 14, 2026, 5:17 PM
Modified
Oct 24, 2026, 9:10 PM
Severity
Important
Public date
Jul 14, 2026, 4:27 PM