High
Security advisory
libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-5310
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:42 UTC · Revision 1
Source evidence
libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.
osv:CVE-2020-5310
Complete source record
{
"id": "32d4d2255ff042c008173cad8ff311a1c24dbcdaed9abdc3e821d0b8d94ff179",
"url": "https://osv.dev/vulnerability/CVE-2020-5310",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2020-5310",
"summary": "libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc.",
"evidence": "osv:CVE-2020-5310",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2020-5310",
"aliases": [
"BIT-pillow-2020-5310",
"CVE-2020-5310",
"GHSA-vcqg-3p29-xw73",
"PYSEC-2020-81"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/python-pillow/pillow",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "a45c8583ff90312a2fddc38567ed736cef4af563"
},
{
"fixed": "4e2def2539ec13e53a82e06c4b3daf00454100c4"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "6.2.2"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "4e2def2539ec13e53a82e06c4b3daf00454100c4"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"6.2.1",
"6.2.0",
"6.1.0",
"6.0.0",
"5.4.0",
"5.3.0",
"5.2.0",
"5.1.0",
"5.0.0",
"4.3.0",
"4.2.0",
"4.1.0",
"4.0.0",
"4.0.0a",
"3.4.0",
"3.3.0",
"3.2.0",
"3.1.0",
"3.1.0-rc1",
"2.9.0",
"2.9.0.dev2",
"2.9.0.dev1",
"2.9.0.dev0",
"2.8.1",
"2.8.0",
"2.7.0",
"2.5.0",
"2.3.0",
"2.2.1",
"2.2.0",
"2.1.0",
"2.0.0",
"1.7.8",
"1.7.7",
"1.2",
"1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2020-5310.json",
"vanir_signatures": [
{
"id": "CVE-2020-5310-dd6ea137",
"digest": {
"threshold": 0.9,
"line_hashes": [
"11063566985366830361541805365964257484",
"10227853089858799829606132986670377937",
"317038433496737873798409669386881171228",
"117583418836728761439750076620579841509",
"42548093785476519379886330909429997892",
"180296352043842206907328859036068743446",
"232392863528886449003010581525191622890",
"170708454611785382970649880980374429778",
"194205829702377816602101179673064497694",
"233404740975746542367800271115279682632",
"263102630687762320497076038078445684335",
"195294903843144035227280250434198303035",
"31124841263578157110148021800467585987",
"310907908465319355122623942791978593816",
"339390408024927267804818065141722014459"
]
},
"source": "https://github.com/python-pillow/pillow/commit/4e2def2539ec13e53a82e06c4b3daf00454100c4",
"target": {
"file": "src/libImaging/TiffDecode.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2020-5310-ebcc8c54",
"digest": {
"length": 4897,
"function_hash": "56824892614320334599794661287660083213"
},
"source": "https://github.com/python-pillow/pillow/commit/4e2def2539ec13e53a82e06c4b3daf00454100c4",
"target": {
"file": "src/libImaging/TiffDecode.c",
"function": "ImagingLibTiffDecode"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:14:09Z"
}
}
],
"modified": "2026-10-20T14:14:09.841676332Z",
"provider": "osv",
"references": [
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2MMU3WT2X64GS5WHDPKKC2WZA7UIIQ3A/",
"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3DUMIBUYGJRAVJCTFUWBRLVQKOUTVX5P/",
"https://pillow.readthedocs.io/en/stable/releasenotes/6.2.2.html",
"https://usn.ubuntu.com/4272-1/",
"https://github.com/python-pillow/Pillow/commit/4e2def2539ec13e53a82e06c4b3daf00454100c4"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:esm:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*"
],
"vendor_product": "canonical:ubuntu_linux",
"extracted_events": [
{
"range": [
{
"introduced": "14.04"
},
{
"last_affected": "14.04"
},
{
"introduced": "16.04"
},
{
"last_affected": "16.04"
},
{
"introduced": "18.04"
},
{
"last_affected": "18.04"
},
{
"introduced": "19.10"
},
{
"last_affected": "19.10"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:*",
"cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*"
],
"vendor_product": "fedoraproject:fedora",
"extracted_events": [
{
"range": [
{
"introduced": "30"
},
{
"last_affected": "30"
},
{
"introduced": "31"
},
{
"last_affected": "31"
}
],
"source": "CPE_STRING"
}
]
}
]
}
},
"related_cves": [
{
"value": "CVE-2020-5310",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388754,
"published_at": "2020-01-03T01:15:11.087+00:00"
}