Out-of-bounds read in Pillow - CVE-2022-22816
Published: January 25, 2022
Vulnerability identifier: #VU60002
CSH Severity: Medium
CVSS v4: 8.7 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-22816
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 sensitive information.
The vulnerability exists due to buffer over-read during initialization of ImagePath.Path in path_getbbox() function in path.c. A remote attacker can pass a specially crafted file to the affected library and read contents of memory on the system.
Affected software
Pillow
Amazon Linux AMI
Gentoo Linux
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for Scientific Computing
CentOS
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for IBM z Systems
Anolis OS
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Server
Red Hat CodeReady Linux Builder for Power, little endian
Red Hat CodeReady Linux Builder for IBM z Systems
Red Hat CodeReady Linux Builder for ARM 64
Red Hat CodeReady Linux Builder for x86_64
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Ubuntu
openEuler
Fedora
python-pillow (Red Hat package)
pillow (Debian package)
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
Red Hat Enterprise Linux Server for x86_64 - Update Services for SAP Solutions
python-pillow-tk
python-pillow
python-pillow-devel
python-pillow-doc
python-pillow-qt
python-pillow-sane
python-pil (Ubuntu package)
python3-pil (Ubuntu package)
python-pillow-debugsource
python3-pillow-devel
python3-pillow-qt
python-pillow-debuginfo
python3-pillow-tk
python3-pillow
python3-pillow-help
mingw-python-pillow
dev-python/pillow
Migration Toolkit for Containers
IBM Cloud Pak for Business Automation
Amazon Linux AMI
Gentoo Linux
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for Scientific Computing
CentOS
Red Hat Enterprise Linux for Power, big endian
Red Hat Enterprise Linux for IBM z Systems
Anolis OS
Red Hat Enterprise Linux Desktop
Red Hat Enterprise Linux Workstation
Red Hat Enterprise Linux Server
Red Hat CodeReady Linux Builder for Power, little endian
Red Hat CodeReady Linux Builder for IBM z Systems
Red Hat CodeReady Linux Builder for ARM 64
Red Hat CodeReady Linux Builder for x86_64
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for x86_64
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Ubuntu
openEuler
Fedora
python-pillow (Red Hat package)
pillow (Debian package)
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
Red Hat Enterprise Linux Server for x86_64 - Update Services for SAP Solutions
python-pillow-tk
python-pillow
python-pillow-devel
python-pillow-doc
python-pillow-qt
python-pillow-sane
python-pil (Ubuntu package)
python3-pil (Ubuntu package)
python-pillow-debugsource
python3-pillow-devel
python3-pillow-qt
python-pillow-debuginfo
python3-pillow-tk
python3-pillow
python3-pillow-help
mingw-python-pillow
dev-python/pillow
Migration Toolkit for Containers
IBM Cloud Pak for Business Automation
How to mitigate CVE-2022-22816
Install update from vendor's website.
Pillow - update to 9.0.0
python-pillow (Red Hat package) - addressed in versions 2.0.0-23.gitd1c6db8.el7_9, 5.1.1-13.el8_1, 5.1.1-14.el8_2, 5.1.1-14.el8_4, 5.1.1-18.el8_5
pillow (Debian package) - addressed in versions 5.4.1-2+deb10u3, 8.1.2+dfsg-0.3+deb11u1
Migration Toolkit for Containers - update to 1.5.4
python-pillow-tk - update to 2.0.0-23.gitd1c6db8
python-pillow - update to 2.0.0-23.gitd1c6db8
python-pillow-devel - update to 2.0.0-23.gitd1c6db8
python-pillow-doc - update to 2.0.0-23.gitd1c6db8
python-pillow-qt - update to 2.0.0-23.gitd1c6db8
python-pillow-sane - update to 2.0.0-23.gitd1c6db8
python-pil (Ubuntu package) - addressed in versions 3.1.20ubuntu1.6+esm1, 5.1.0-1ubuntu0.7, 5.1.0-1ubuntu0.8
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-pillow - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python-pillow-debugsource - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-devel - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-qt - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python-pillow-debuginfo - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-tk - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-help - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
mingw-python-pillow - addressed in versions 8.1.2-5.fc34, 8.3.2-2.fc35
python-pillow - addressed in versions 8.1.2-6.fc34, 8.3.2-2.fc35
python-pillow - update to 9.0.1-6
dev-python/pillow - update to 9.3.0
IBM Cloud Pak for Business Automation - addressed in versions 21.0.3.15, 22.0.1.5
python-pillow (Red Hat package) - addressed in versions 2.0.0-23.gitd1c6db8.el7_9, 5.1.1-13.el8_1, 5.1.1-14.el8_2, 5.1.1-14.el8_4, 5.1.1-18.el8_5
pillow (Debian package) - addressed in versions 5.4.1-2+deb10u3, 8.1.2+dfsg-0.3+deb11u1
Migration Toolkit for Containers - update to 1.5.4
python-pillow-tk - update to 2.0.0-23.gitd1c6db8
python-pillow - update to 2.0.0-23.gitd1c6db8
python-pillow-devel - update to 2.0.0-23.gitd1c6db8
python-pillow-doc - update to 2.0.0-23.gitd1c6db8
python-pillow-qt - update to 2.0.0-23.gitd1c6db8
python-pillow-sane - update to 2.0.0-23.gitd1c6db8
python-pil (Ubuntu package) - addressed in versions 3.1.20ubuntu1.6+esm1, 5.1.0-1ubuntu0.7, 5.1.0-1ubuntu0.8
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-pillow - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python-pillow-debugsource - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-devel - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-qt - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python-pillow-debuginfo - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-tk - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
python3-pillow-help - addressed in versions 8.1.1-8, 9.0.1-8, 9.0.1-12, 9.0.1-16, 10.3.0-3, 10.3.0-5, 10.3.0-8, 10.3.0-13
mingw-python-pillow - addressed in versions 8.1.2-5.fc34, 8.3.2-2.fc35
python-pillow - addressed in versions 8.1.2-6.fc34, 8.3.2-2.fc35
python-pillow - update to 9.0.1-6
dev-python/pillow - update to 9.3.0
IBM Cloud Pak for Business Automation - addressed in versions 21.0.3.15, 22.0.1.5
External References
- https://github.com/python-pillow/Pillow/blob/c5d9223a8b5e9295d15b5a9b1ef1dae44c8499f3/src/path.c#L331
- https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fixed-imagepath-path-array-handling
- https://lists.debian.org/debian-lts-announce/2022/01/msg00018.html
- https://www.debian.org/security/2022/dsa-5053
Related Security Bulletins
- Multiple vulnerabilities in Pillow
- Debian update for pillow
- Red Hat Enterprise Linux 7 update for python-pillow
- Red Hat Enterprise Linux 8 update for python-pillow
- Red Hat Enterprise Linux 8.2 update for python-pillow
- Red Hat Enterprise Linux 8.1 update for python-pillow
- Red Hat Enterprise Linux 8.4 update for python-pillow
- CentOS 7 update for python-pillow
- Ubuntu update for pillow
- Gentoo update for Pillow
- Ubuntu update for pillow
- Ubuntu update for pillow
- Multiple vulnerabilities in IBM Cloud Pak for Business Automation
- openEuler update for python-pillow
- Amazon Linux AMI update for python-pillow
- Multiple vulnerabilities in Migration Toolkit for Containers 1.5
- Fedora 34 update for mingw-python-pillow, python-pillow
- Fedora 35 update for mingw-python-pillow, python-pillow
- Anolis OS update for python-pillow
- openEuler 24.03 LTS SP3 update for python-pillow
- openEuler 24.03 LTS SP1 update for python-pillow
- openEuler 24.03 LTS update for python-pillow
- openEuler 24.03 LTS update for python-pillow
- openEuler 22.03 LTS SP4 update for python-pillow
- openEuler 20.03 LTS SP4 update for python-pillow
- openEuler 24.03 LTS SP3 update for python-pillow
- openEuler 24.03 LTS SP4 update for python-pillow
- openEuler 24.03 LTS SP3 update for python-pillow
- openEuler 24.03 LTS SP1 update for python-pillow
- openEuler 22.03 LTS SP4 update for python-pillow
- openEuler 20.03 LTS SP4 update for python-pillow
- openEuler 24.03 LTS SP1 update for python-pillow
- openEuler 22.03 LTS SP4 update for python-pillow
- openEuler 20.03 LTS SP4 update for python-pillow
- openEuler 24.03 LTS SP4 update for python-pillow
- openEuler 24.03 LTS SP3 update for python-pillow