
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-54058 is an out-of-bounds read vulnerability in Pillow, the Python imaging library, affecting all versions prior to 12.3.0. When Pillow loads an uncompressed McIdas AREA image from a filename via the mmap raw codec path, attacker-controlled header words can set a row stride smaller than the natural row width, causing pixel access operations to read beyond the mapped memory region. The vulnerability was reported by GameZoneHacker, disclosed on July 14, 2026, and fixed in Pillow 12.3.0 released July 1, 2026. It carries a CVSS v3.1 base score of 9.1 (Critical) and a CVSS v4.0 base score of 8.3 (High) (GitHub Advisory, Red Hat Bugzilla).
The root cause is an out-of-bounds read (CWE-125) in Pillow's PyImaging_MapBuffer function (src/map.c). The McIdasImagePlugin derives image dimensions, file offset, and row stride directly from attacker-controlled 32-bit header words without validation. By setting header word w[14]=0 and w[15]=1, an attacker can produce a stride of 1 byte — far smaller than the actual row width (xsize * pixelsize). The mmap branch in ImageFile.load only validates that offset + ysize*stride <= buffer_len, but never checks that stride >= linesize (the true per-row read width). As a result, PyImaging_MapBuffer builds row pointers spaced only 1 byte apart into the memory-mapped file, while pixel consumers such as Image.tobytes(), getpixel, convert, or save read xsize * pixelsize bytes per row — reading far past the mapped region into adjacent process memory (GitHub Advisory, Fix Commit).
Successful exploitation enables two high-severity outcomes: information disclosure and denial of service. An unauthenticated attacker who can supply a crafted McIdas AREA image file to an application that opens it from a path on disk (e.g., a web service that saves uploads to a temp file and processes them with Pillow) can cause the application to return adjacent heap or mapped memory contents — potentially exposing secrets, credentials, or other users' data. Alternatively, a sufficiently large xsize value reliably triggers a SIGBUS crash, causing denial of service for the affected worker process (GitHub Advisory, Red Hat Bugzilla).
The NVD SSVC assessment classifies exploitation status as "poc" (proof-of-concept available), with a PoC zip file referenced in the GitHub security advisory. No evidence of in-the-wild exploitation has been reported. The vulnerability requires no authentication, no user interaction, and no special privileges — only the ability to supply a crafted image file to an application that processes it via Pillow's Image.open() on a file path. The EPSS score is approximately 0.38%, indicating low but non-negligible probability of exploitation in the near term. The vulnerability is not currently listed in the CISA KEV catalog (GitHub Advisory, Feedly).
\x00\x00\x00\x00\x00\x00\x00\x04. Set header words to define a large xsize (e.g., w[10]=200000), ysize=1 (w[9]=1), mode L (w[11]=1), and a stride of 1 (w[14]=0, w[15]=1), resulting in stride = w[15] + w[10]*w[11]*w[14] = 1..area file to any application that accepts user-provided image files and processes them with Pillow using Image.open(path) (the mmap fast-path is only triggered when opening from a filename, not a file object).Image.tobytes(), getpixel(), convert(), or save() — which invokes the raw encoder and reads xsize bytes from each row pointer.xsize * pixelsize (e.g., 200,000) bytes starting from view.buf + offset, running far past the 256-byte mapped file into adjacent process memory. If the application returns or stores the decoded pixel data, it will contain leaked process memory. If xsize is large enough to cross an unmapped page boundary, the process crashes with SIGBUS (GitHub Advisory)..area files (256-byte files with magic prefix \x00\x00\x00\x00\x00\x00\x00\x04 and anomalous header values such as very large xsize with stride=1) in upload directories or temporary file locations.ValueError: buffer is not large enough or OSError: buffer is not large enough when processing image files (patched versions reject the file; unpatched versions may crash or silently leak); SIGBUS or segmentation fault signals in process crash logs associated with Pillow worker processes..area extensions or files with the McIdas AREA magic bytes (\x00\x00\x00\x00\x00\x00\x00\x04) in the first 8 bytes, particularly from untrusted sources (GitHub Advisory).Upgrade Pillow to version 12.3.0 or later, which fixes the vulnerability by ensuring the stride passed to PyImaging_MapBuffer is always at least xsize * pixelsize (one full row of pixels), implemented in src/map.c via PR #9719 (Pillow Release, Fix Commit). Red Hat has addressed this in RHSA-2026:48021 for Red Hat Enterprise Linux 8, and SUSE has issued SUSE-SU-2026:3084-1 and SUSE-SU-2026:3268-1 (Red Hat Bugzilla). As a workaround where immediate patching is not possible, restrict the ability to load images from untrusted sources, avoid opening McIdas AREA format files from user-supplied paths, or sandbox image processing operations to limit the impact of memory disclosure.
The vulnerability was reported by researcher GameZoneHacker and addressed promptly by the Pillow maintainer radarhere, who authored the fix and published the security advisory. The GitHub advisory notes a proof-of-concept was attached to the report. Downstream Linux distributions including Red Hat, SUSE, openSUSE, and Fedora issued security updates shortly after disclosure. No significant broader media coverage or notable social media discussion has been identified beyond standard vulnerability tracking and distribution security announcements (GitHub Advisory, Red Hat Bugzilla).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."