Out-of-bounds read in Pillow - CVE-2021-25288

 

Out-of-bounds read in Pillow - CVE-2021-25288

Published: April 13, 2021


Vulnerability identifier: #VU52188
CSH Severity: Medium
CVSS v4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-25288
CWE-ID: CWE-125
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to gain access to potentially sensitive information.

The vulnerability exists due to a boundary condition in Jpeg2KDecode method. A remote attacker can create a specially crafted J2k image, trigger out-of-bounds read error and read contents of memory on the system.


Affected software

Pillow
openSUSE Leap
Ubuntu
Fedora
python3-pil (Ubuntu package)
python-pil (Ubuntu package)
mingw-python-pillow
python-pillow
python-Pillow-debuginfo
python3-Pillow-tk
python-Pillow-debugsource
python3-Pillow
python3-Pillow-tk-debuginfo
python3-Pillow-debuginfo

How to mitigate CVE-2021-25288

Install updates from vendor's website.

Pillow - update to 8.2.0
python3-pil (Ubuntu package) - addressed in versions 5.1.0-1ubuntu0.6, 7.0.0-4ubuntu0.4, 7.2.0-1ubuntu0.3, 8.1.2-1ubuntu0.1
python-pil (Ubuntu package) - update to 5.1.0-1ubuntu0.6
mingw-python-pillow - addressed in versions 7.2.0-6.fc33, 8.1.2-2.fc34
python-pillow - addressed in versions 7.2.0-6.fc33, 8.1.2-3.fc34
python-Pillow-debuginfo - update to 7.2.0-150300.3.12.1
python3-Pillow-tk - update to 7.2.0-150300.3.12.1
python-Pillow-debugsource - update to 7.2.0-150300.3.12.1
python3-Pillow - update to 7.2.0-150300.3.12.1
python3-Pillow-tk-debuginfo - update to 7.2.0-150300.3.12.1
python3-Pillow-debuginfo - update to 7.2.0-150300.3.12.1

External References

Related Security Bulletins