Skip to content
Fencer Vulns
critical 9.8

CVE-2020-5311 json

Buffer Copy without Checking Size of Input in Pillow

published 2020-01-03 6 y ago modified 2026-09-08 2 mo ago also BIT-pillow-2020-5311 , EUVD-2020-0135 , GHSA-r7rm-8j6h-r933 , PYSEC-2020-82

cvss
9.8
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.0%
EPSS 4.0% chance of exploitation in 30 days, percentile 90%
public exploits
0
none known

Summary

libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.

Patch / fix

  • pypi pillow 6.2.2
  • bitnami pillow 6.2.2
  • python pillow 6.2.2
  • pillow Debian 14, Debian 13, Debian 12 7.0.0-1

debian advisories DEBIAN-CVE-2020-5311

  • pillow Ubuntu 18.04 LTS 5.1.0-1ubuntu0.2

ubuntu advisories UBUNTU-CVE-2020-5311

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-pillow RHEL 8 5.1.1-10.el8_1
  • python3-pillow RHEL 8 5.1.1-10.el8_1
  • python-pillow RHEL 8.0 E4S 5.1.1-10.el8_0
  • python3-pillow RHEL 8.0 E4S 5.1.1-10.el8_0

red hat advisories RHSA-2020:0580RHSA-2020:0566

  • kibana OpenStack Cloud Crowbar 9, OpenStack Cloud 9 4.6.3-4.3.2
  • grafana OpenStack Cloud Crowbar 9, OpenStack Cloud 9 6.2.5-3.12.2
  • ansible1 OpenStack Cloud 9 1.9.6-9.7.2
  • ardana-mq OpenStack Cloud 9 9.0+git.1593618110.cbd1a37-3.16.2
  • crowbar-core OpenStack Cloud Crowbar 9 6.0+git.1594619891.b75a61d0d-3.25.5
  • rubygem-puma OpenStack Cloud Crowbar 9 2.16.0-4.9.1
  • ardana-glance OpenStack Cloud 9 9.0+git.1593631708.9354a78-3.13.2
  • ardana-manila OpenStack Cloud 9 9.0+git.1594158642.b5905e4-3.12.2

suse advisories SUSE-RU-2020:2161-1

  • py3-pillow Alpine 3.24, Alpine 3.23, Alpine 3.22 +10 more 6.2.2-r0

alpine advisories ALPINE-CVE-2020-5311

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2020-5311 updated cvss 9.8

python-pillow: out-of-bounds write in expandrow in libImaging/SgiRleDecode.c

  • Red Hat Enterprise Linux 5 python-imaging
    affected: no fix planned “Out of support scope”
  • Red Hat Quay v3 quay/quay-rhel8 v3.4.0-51, quay/clair-rhel8 v3.4.0-25, quay/quay-builder-rhel8 v3.4.0-18, quay/quay-operator-bundle v3.4.0-89, quay/quay-operator-rhel8 v3.4.0-132, quay/quay-bridge-operator-bundle v3.4.0-3, +5 more
    fixed: vendor fix RHSA-2021:0420
  • Red Hat Enterprise Linux AppStream (v. 8) python-pillow 5.1.1-10.el8_1, python3-pillow 5.1.1-10.el8_1
    fixed: vendor fix RHSA-2020:0580
  • Red Hat Enterprise Linux AppStream E4S (v. 8.0) python-pillow 5.1.1-10.el8_0, python3-pillow 5.1.1-10.el8_0
    fixed: vendor fix RHSA-2020:0566
  • Red Hat Enterprise Linux 6 python-imaging, python-imaging-tk, python-imaging-sane Red Hat Enterprise Linux 7 python-pillow, python-pillow-qt, python-pillow-tk, python-pillow-sane
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.05% chance of exploitation in the next 30 days, higher than 90% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
OSV 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
pypi pillow
<6.2.2
6.2.2
bitnami pillow
<6.2.2
6.2.2

Classification

Weakness
  • CWE-120 Buffer Copy without Checking Size of Input

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.