Buffer overflow in Pillow - CVE-2019-19911

 

Buffer overflow in Pillow - CVE-2019-19911

Published: January 13, 2020


Vulnerability identifier: #VU24205
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-2019-19911
CWE-ID: CWE-119
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 when processing FPX images due to the "FpxImagePlugin.py" calls the range function on an unvalidated 32-bit integer if the number of bands is large. A remote attacker can trigger memory corruption and cause a denial of service condition on the target system.

On Windows running 32-bit Python, this results in an OverflowError or MemoryError due to the 2 GB limit. However, on Linux running 64-bit Python this results in the process being terminated by the OOM killer.


Affected software

Pillow
pillow (Ubuntu package)
pillow (Debian package)
py-pillow (Alpine package)
py3-pillow (Alpine package)
python2-pillow-help
python-pillow-debugsource
python3-pillow
python-pillow-debuginfo
python2-pillow
python2-pillow-devel
python3-pillow-devel
python3-pillow-help
python-pillow
Fedora
openEuler

How to mitigate CVE-2019-19911

Install updates from vendor's website.

Pillow - update to 6.2.2
pillow (Ubuntu package) - addressed in versions 3.1.2-0ubuntu1.3, 5.1.0-1ubuntu0.2, 6.1.0-1ubuntu0.2
pillow (Debian package) - addressed in versions 4.0.0-4+deb9u1, 5.4.1-2+deb10u1
py-pillow (Alpine package) - update to 6.2.2-r0
py3-pillow (Alpine package) - addressed in versions 7.1.2-r1, 7.2.0-r1, 8.1.0-r0
python2-pillow-help - update to 5.3.0-10
python-pillow-debugsource - update to 5.3.0-10
python3-pillow - update to 5.3.0-10
python-pillow-debuginfo - update to 5.3.0-10
python2-pillow - update to 5.3.0-10
python2-pillow-devel - update to 5.3.0-10
python3-pillow-devel - update to 5.3.0-10
python3-pillow-help - update to 5.3.0-10
python-pillow - update to 5.3.0-10
python-pillow - update to 5.4.1-4.fc30
python3-pillow - update to 6.2.2-1.el7

External References

Related Security Bulletins