Out-of-bounds read in Pillow - CVE-2026-54058

 

Out-of-bounds read in Pillow - CVE-2026-54058

Published: July 7, 2026


Vulnerability identifier: #VU137006
CSH Severity: High
CVSS v4: 6.8 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2026-54058
CWE-ID: CWE-125
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to disclose sensitive information or cause a denial of service.

The vulnerability exists due to an out-of-bounds read in the PyImaging_MapBuffer mmap path used with the McIdas AREA plugin when processing a crafted image file opened from a filename. A remote attacker can supply a specially crafted McIdas AREA image with an undersized row stride to disclose sensitive information or cause a denial of service.

The issue is reachable when Pillow memory-maps an uncompressed raw tile in a mode listed in Image._MAPMODES, and pixel access operations such as Image.tobytes(), getpixel, convert, or save trigger the read.


Affected software

Pillow
SUSE Linux Enterprise Server 15 SP6
SUSE Linux Enterprise Server 15 SP5
SUSE Linux Enterprise Server 15 SP4
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise Desktop 15
SUSE Linux Enterprise Real Time 15
Anolis OS
Red Hat CodeReady Linux Builder for IBM z Systems
Red Hat CodeReady Linux Builder for ARM 64
Red Hat CodeReady Linux Builder for Power, little endian
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for ARM 64
Red Hat CodeReady Linux Builder for x86_64
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux Server - TUS
SUSE Package Hub 15
Python 3 Module
openSUSE Leap
openEuler
Fedora
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
python-pillow (Red Hat package)
python3-pillow-doc
python3-pillow-tk
python3-pillow-devel
python3-pillow
python-Pillow-debuginfo
python3-Pillow-debuginfo
python3-Pillow-tk-debuginfo
python-Pillow-debugsource
python3-Pillow
python3-Pillow-tk
python-pillow-debugsource
python3-pillow-qt
python3-pillow-help
python-pillow
python-pillow-debuginfo
python311-Pillow
python311-Pillow-tk-debuginfo
python311-Pillow-debuginfo
python311-Pillow-tk

How to mitigate CVE-2026-54058

Install security update from vendor's website.

Pillow - update to 12.3.0
python-pillow (Red Hat package) - addressed in versions 5.1.1-15.el8_4.2, 5.1.1-20.el8_6.1, 5.1.1-20.el8_8.1, 5.1.1-23.el8_10
python3-pillow-doc - addressed in versions 5.1.1-23, 12.2.0-3
python3-pillow-tk - addressed in versions 5.1.1-23, 12.2.0-3
python3-pillow-devel - addressed in versions 5.1.1-23, 12.2.0-3
python3-pillow - addressed in versions 5.1.1-23, 12.2.0-3
python-Pillow-debuginfo - addressed in versions 7.2.0-150300.3.30.1, 9.5.0-150400.5.25.1
python3-Pillow-debuginfo - update to 7.2.0-150300.3.30.1
python3-Pillow-tk-debuginfo - update to 7.2.0-150300.3.30.1
python-Pillow-debugsource - addressed in versions 7.2.0-150300.3.30.1, 9.5.0-150400.5.25.1
python3-Pillow - update to 7.2.0-150300.3.30.1
python3-Pillow-tk - update to 7.2.0-150300.3.30.1
python-pillow-debugsource - addressed in versions 9.0.1-16, 10.3.0-13
python3-pillow - addressed in versions 9.0.1-16, 10.3.0-13
python3-pillow-devel - addressed in versions 9.0.1-16, 10.3.0-13
python3-pillow-qt - addressed in versions 9.0.1-16, 10.3.0-13
python3-pillow-tk - addressed in versions 9.0.1-16, 10.3.0-13
python3-pillow-help - addressed in versions 9.0.1-16, 10.3.0-13
python-pillow - addressed in versions 9.0.1-16, 10.3.0-13
python-pillow-debuginfo - addressed in versions 9.0.1-16, 10.3.0-13
python311-Pillow - update to 9.5.0-150400.5.25.1
python311-Pillow-tk-debuginfo - update to 9.5.0-150400.5.25.1
python311-Pillow-debuginfo - update to 9.5.0-150400.5.25.1
python311-Pillow-tk - update to 9.5.0-150400.5.25.1
python-pillow - update to 11.3.0-10.fc43
python3-pillow-qt - update to 12.2.0-3

External References

Related Security Bulletins