CVE-2020-5310
Integer overflow in Pillow
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
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 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H - CVSS 2.0
- 6.8 Medium
AV: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 Critical
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 High
CVSS: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 Critical
CVSS: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 High
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
pillowPyPI |
before 6.2.2 | 6.2.2 |
py3-pillowAlpine:v3.12 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.13 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.14 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.15 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.16 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.17 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.18 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.19 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.20 |
before 6.2.2-r0 | 6.2.2-r0 |
Show 11 moreShow less
| Package | Affected | Fixed |
|---|---|---|
py3-pillowAlpine:v3.21 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.22 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.23 |
before 6.2.2-r0 | 6.2.2-r0 |
py3-pillowAlpine:v3.24 |
before 6.2.2-r0 | 6.2.2-r0 |
pillowBitnami |
before 6.2.2 | 6.2.2 |
pillowDebian:12 |
before 7.0.0-1 | 7.0.0-1 |
pillowDebian:13 |
before 7.0.0-1 | 7.0.0-1 |
pillowDebian:14 |
before 7.0.0-1 | 7.0.0-1 |
pillowPyPI |
before 6.2.2, plus listed versions 1.01.11.21.31.4 Show 45 moreShow less1.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-pillowMageia:7 From an advisory covering 6 CVEs |
before 5.4.1-1.1.mga7 | 5.4.1-1.1.mga7 |
pillowPyPI |
before 6.2.2, plus listed versions 1.01.11.21.31.4 Show 45 moreShow less1.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
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected | OSV | |
| aliases | EUVD | |
| first indexed | CVE 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
pillow.readthedocs.io/en/stable/releasenotes/6.2.2.html
github.com/python-pillow/Pillow/commit/4e2def2539ec13e53a82e06c4b3daf00454100c4
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2MMU3WT2X64GS5WHDPKKC2WZA7UIIQ3A
usn.ubuntu.com/4272-1
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3DUMIBUYGJRAVJCTFUWBRLVQKOUTVX5P
nvd.nist.gov/vuln/detail/CVE-2020-5310
Show 10 moreShow less
github.com/pypa/advisory-db/blob/7872b0a91b4d980f749e6d75a81f8cc1af32829f/vulns/pillow/PYSEC-2020-81.yaml
github.com/advisories/GHSA-vcqg-3p29-xw73
github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2020-81.yaml
lists.fedoraproject.org/archives/list/[email protected]/message/2MMU3WT2X64GS5WHDPKKC2WZA7UIIQ3A
lists.fedoraproject.org/archives/list/[email protected]/message/3DUMIBUYGJRAVJCTFUWBRLVQKOUTVX5P
security.alpinelinux.org/vuln/CVE-2020-5310
security-tracker.debian.org/tracker/CVE-2020-5310
github.com/python-pillow/Pillow
advisories.mageia.org/MGASA-2020-0088.html
bugs.mageia.org/show_bug.cgi?id=25968
Left out here: 36 versions. The JSON record has them.