Input validation error in Pillow - CVE-2021-28677

 

Input validation error in Pillow - CVE-2021-28677

Published: April 13, 2021


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

Vulnerability details

The vulnerability allows a remote attacker to perform a denial of service (DoS) attack.

The vulnerability exists due to insufficient validation of user-supplied input when processing new line characters, such as "\r", "\n" when opening files. A remote attacker can pass specially crafted file to the application and perform a denial of service (DoS) attack.


Affected software

Pillow
Fedora
openSUSE Leap
Ubuntu
python3-pil (Ubuntu package)
python-pil (Ubuntu package)
python3-pillow
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-28677

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
python3-pillow - update to 6.2.2-3.el7
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