Junglewise Threat Intelligence

CVE-2026-54058: Pillow out-of-bounds read in McIdas AREA image parsing

CVE-2026-54058 · Severity: high · CVSS 4 · Published 2026-07-14

Technologies: Python-Pillow Pillow. Vendors: PyPI.

Executive brief

Pillow, a widely used Python library for image processing, is vulnerable to a memory safety issue when handling McIdas AREA image files. An attacker can provide a specially crafted image file that, when opened from a file path, causes the application to read memory outside of the intended boundaries. This can lead to the exposure of sensitive information from the application's memory or cause the program to crash, resulting in a denial of service.

Technical details

An out-of-bounds read exists in Pillow's `PyImaging_MapBuffer` (src/map.c) and the McIdas AREA plugin (`McIdasImagePlugin.py`). When an image is opened from a filename and uses the `raw` codec in a memory-mapped mode, the library fails to verify that the `stride` (per-row spacing) is at least as large as the natural row width (`xsize * pixelsize`). An attacker can control header words in a McIdas AREA file to set a small `stride` while maintaining a large `xsize`. This causes subsequent pixel access operations (like `tobytes()`, `save()`, or `convert()`) to read past the mapped buffer into adjacent process memory. This results in information disclosure or a SIGBUS-induced denial of service. The vulnerability is addressed in version 12.3.0.

Affected products

  • python-pillow Pillow < 12.3.0

Timeline

  • 2026-07-07: advisory: Initial GitHub Advisory published
  • 2026-07-20: disclosed: Full advisory disclosure and update

References

Related threats