Buffer overflow in Pillow - CVE-2021-34552

 

Buffer overflow in Pillow - CVE-2021-34552

Published: October 24, 2022


Vulnerability identifier: #VU68607
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2021-34552
CWE-ID: CWE-119
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to a boundary error when processing untrusted input. A remote attacker with ability to pass controlled parameters directly into a convert function can trigger memory corruption and execute arbitrary code on the target system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.


Affected software

Pillow
Gentoo Linux
Arch Linux
Fedora
SUSE OpenStack Cloud
SUSE OpenStack Cloud Crowbar
HPE Helion Openstack
Ubuntu
python-Pillow
python-Pillow-debuginfo
python-Pillow-debugsource
python3-pil (Ubuntu package)
python-pil (Ubuntu package)
python3-pillow
python2-pillow
mingw-python-pillow
python-pillow
dev-python/pillow

How to mitigate CVE-2021-34552

Install updates from vendor's website.

Pillow - update to 8.3.0
python-Pillow - addressed in versions 2.8.1-4.25.1, 4.2.1-3.17.1, 5.2.0-3.11.1
python-Pillow-debuginfo - addressed in versions 2.8.1-4.25.1, 4.2.1-3.17.1, 5.2.0-3.11.1
python-Pillow-debugsource - addressed in versions 2.8.1-4.25.1, 4.2.1-3.17.1, 5.2.0-3.11.1
python3-pil (Ubuntu package) - addressed in versions 3.1.20ubuntu1.6+esm1, 5.1.0-1ubuntu0.7, 5.1.0-1ubuntu0.8, 7.0.0-4ubuntu0.5, 7.0.0-4ubuntu0.6, 8.1.2+dfsg-0.3ubuntu0.1, 8.1.2-1ubuntu0.2
python-pil (Ubuntu package) - addressed in versions 3.1.20ubuntu1.6+esm1, 5.1.0-1ubuntu0.7, 5.1.0-1ubuntu0.8
python3-pillow - update to 6.2.2-3.el7
python2-pillow - update to 6.2.2-6.fc33
mingw-python-pillow - addressed in versions 7.2.0-7.fc33, 8.1.2-3.fc34
python-pillow - addressed in versions 7.2.0-7.fc33, 8.1.2-4.fc34
python-pillow - update to 8.3.0-1
dev-python/pillow - update to 9.3.0

External References

Related Security Bulletins