Path traversal in Pillow - CVE-2022-22815

 

Path traversal in Pillow - CVE-2022-22815

Published: January 25, 2022


Vulnerability identifier: #VU60001
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-22815
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences in path_getbbox() function in path.c. A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.


Affected software

Pillow
Gentoo Linux
Ubuntu
openEuler
Fedora
pillow (Debian package)
python-pil (Ubuntu package)
python3-pil (Ubuntu package)
python3-pillow-tk
python3-pillow-help
python3-pillow
python-pillow-debuginfo
python3-pillow-qt
python3-pillow-devel
python-pillow-debugsource
python-pillow
mingw-python-pillow
dev-python/pillow
IBM Cloud Pak for Business Automation

How to mitigate CVE-2022-22815

Install update from vendor's website.

Pillow - update to 9.0.0
pillow (Debian package) - addressed in versions 5.4.1-2+deb10u3, 8.1.2+dfsg-0.3+deb11u1
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
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-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
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
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-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
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
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
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
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
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

Related Security Bulletins