Every CVE Search/ Get API key

CVE-2020-5310

Integer overflow in Pillow

8.8 HighFix available

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

1.98%Up 0.7 points since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 8.8

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
CVE-2020-5310
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-190
Updated
2026-11-02
CVE List No score

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
CVE-2020-5310
Updated
2026-11-02
EUVDEUVD-2020-0134 No score

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
EUVD-2020-0134
Updated
2026-11-03
GitHub AdvisoriesGHSA-vcqg-3p29-xw73 9.3

Integer overflow in Pillow

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
GHSA-vcqg-3p29-xw73
CVSS 4.0
9.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVALPINE-CVE-2020-5310 8.8

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
ALPINE-CVE-2020-5310
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSV 8.8

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
CVE-2020-5310
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2020-5310 8.8

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
DEBIAN-CVE-2020-5310
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-vcqg-3p29-xw73 9.3

Integer overflow in Pillow

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
GHSA-vcqg-3p29-xw73
CVSS 4.0
9.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
8.8 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Weakness
CWE-190
Updated
2026-11-02
OSVBIT-pillow-2020-5310 No score

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
BIT-pillow-2020-5310
Updated
2026-11-02
OSVMGASA-2020-0088 No score

Updated python-pillow packages fix security vulnerabilities

Updated python-pillow packages fix security vulnerabilities:

It was discovered that Pillow incorrectly handled certain images. An attacker could possibly use this issue to cause a denial of service (CVE-2019-16865, CVE-2019-19911).

It was discovered that Pillow incorrectly handled certain TIFF images. An attacker could possibly use this issue to cause a crash (CVE-2020-5310).

It was discovered that Pillow incorrectly handled certain SGI images. An attacker could possibly use this issue to execute arbitrary code or cause a crash (CVE-2020-5311).

It was discovered that Pillow incorrectly handled certain PCX images. An attacker could possibly use this issue to execute arbitrary code or cause a crash (CVE-2020-5312).

It was discovered that Pillow incorrectly handled certain Flip images. An attacker could possibly use this issue to execute arbitrary code or cause a crash (CVE-2020-5313).

Record
MGASA-2020-0088
Updated
2026-11-02
OSVPYSEC-2020-81 No score

libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.

Record
PYSEC-2020-81
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
pillow
PyPI
before 6.2.2
6.2.2
py3-pillow
Alpine:v3.12
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.13
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.14
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.15
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.16
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.17
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.18
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.19
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.20
before 6.2.2-r0
6.2.2-r0
Show 11 moreShow less
Affected packages
PackageAffectedFixed
py3-pillow
Alpine:v3.21
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.22
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.23
before 6.2.2-r0
6.2.2-r0
py3-pillow
Alpine:v3.24
before 6.2.2-r0
6.2.2-r0
pillow
Bitnami
before 6.2.2
6.2.2
pillow
Debian:12
before 7.0.0-1
7.0.0-1
pillow
Debian:13
before 7.0.0-1
7.0.0-1
pillow
Debian:14
before 7.0.0-1
7.0.0-1
pillow
PyPI
before 6.2.2, plus listed versions
1.01.11.21.31.4
Show 45 moreShow less
1.51.61.7.01.7.11.7.21.7.31.7.41.7.51.7.61.7.71.7.82.0.02.1.02.2.02.2.12.2.22.3.02.3.12.3.22.4.02.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.8.02.8.12.8.22.9.03.0.03.1.03.1.0.rc13.1.0rc13.1.13.1.23.2.03.3.03.3.13.3.23.3.33.4.03.4.1
6.2.2
python-pillow
Mageia:7
From an advisory covering 6 CVEs
before 5.4.1-1.1.mga7
5.4.1-1.1.mga7
pillow
PyPI
before 6.2.2, plus listed versions
1.01.11.21.31.4
Show 45 moreShow less
1.51.61.7.01.7.11.7.21.7.31.7.41.7.51.7.61.7.71.7.82.0.02.1.02.2.02.2.12.2.22.3.02.3.12.3.22.4.02.5.02.5.12.5.22.5.32.6.02.6.12.6.22.7.02.8.02.8.12.8.22.9.03.0.03.1.0rc13.1.0.rc13.1.03.1.13.1.23.2.03.3.03.3.13.3.23.3.33.4.03.4.1
6.2.2

History

History
RecordedChangedSources
affected, facts
affectedOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2020-5310 is a high vulnerability (CVSS 8.8) in Python Pillow, published January 3, 2020. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.98%, the 80th percentile. Fixed in pillow 6.2.2.

References

Show 10 moreShow less
This page doesn't list everything

Left out here: 36 versions. The JSON record has them.

MoveEnter Open