CVE-2020-5311 Buffer Copy without Checking Size of Input in Pillow
A buffer overflow in Pillow's SGI decoder allows attackers to execute arbitrary code or cause denial of service via crafted images.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2020-5311?
CVE-2020-5311 is a critical memory corruption vulnerability in Canonical Ubuntu Linux, published on 3 Jan 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.
Weakness: CWE-120
Which versions are affected by CVE-2020-5311?
4 open source packages ship an affected version, including pillow. It affects 4 products.
| Package | Affected | Fixed in |
|---|---|---|
pillow Bitnami | All versions | 6.2.2 |
pillow PyPI | All versions | 6.2.2 |
pillow PyPI | All versions | 6.2.2 |
pillow PyPI | All versions | 6.2.2 |
Products include Canonical Ubuntu Linux, Debian Debian Linux, Fedoraproject Fedora, Python Pillow.
How do I fix CVE-2020-5311?
Upgrade pillow to 6.2.2 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2020-5311 being exploited?
There is no known exploitation of CVE-2020-5311 in the wild and no public exploit code.
Other vulnerabilities in Canonical Ubuntu Linux
Sources
Also known as ALPINE-CVE-2020-5311, BIT-pillow-2020-5311, DEBIAN-CVE-2020-5311, GHSA-r7rm-8j6h-r933, PYSEC-2020-82, UBUNTU-CVE-2020-5311.