Critical
Security advisory
libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2020-5311
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 09:26 UTC · Revision 1
Source evidence
libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.
osv:CVE-2020-5311
Complete source record
{
"id": "4ff7ae3af435a1475951faadce5cb3f7d3e7aa9d49a25fb18a7d9f373c16ea32",
"url": "https://osv.dev/vulnerability/CVE-2020-5311",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2020-5311",
"summary": "libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.",
"evidence": "osv:CVE-2020-5311",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2020-5311",
"aliases": [
"BIT-pillow-2020-5311",
"CVE-2020-5311",
"GHSA-r7rm-8j6h-r933",
"PYSEC-2020-82"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/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": "a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "6.2.2"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
}
],
"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-5311.json",
"vanir_signatures": [
{
"id": "CVE-2020-5311-655a3b71",
"digest": {
"threshold": 0.9,
"line_hashes": [
"74394628443402872264910573382191555015",
"331322978970584824777287696594234124122",
"23182711350509848214109658018129134498",
"21295675298201514072661238004526791439",
"147362313223325050429672845411114095032",
"11728680069999553532564805891395609734",
"146542584084456442475866787063765149690",
"111995761264553157563801106692361300122",
"336894040779789205909693731782617387270",
"282092743345704169374304954216301115022",
"169513242581767477544127227679857517673",
"64785095045983690514758407603369230022",
"147362313223325050429672845411114095032",
"11728680069999553532564805891395609734",
"146542584084456442475866787063765149690",
"125630191536919897373952870166590578771",
"58373006746695298486896448352276165673",
"335858634260284363779854828498007781985",
"109186713654740590875643673206751540586",
"252524666320560104270511936646063661420",
"228363093971994857844065892422863375425",
"220845418040944005946317753051840329161",
"24059358200304628671709782237977515221",
"175644003446321522865613307084547865669",
"186816661014658657970488018787100125892",
"84551653920536917952441927246021476869",
"246616666101419533298827601867129363327",
"284404479206762129323202108270234175513",
"116356111928500685543966321177907648373"
]
},
"source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3",
"target": {
"file": "src/libImaging/SgiRleDecode.c"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2020-5311-7b789c14",
"digest": {
"length": 503,
"function_hash": "23537580919283434488848292199174173919"
},
"source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3",
"target": {
"file": "src/libImaging/SgiRleDecode.c",
"function": "expandrow2"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2020-5311-df88ec3e",
"digest": {
"length": 441,
"function_hash": "189928262583536917268053492207105390628"
},
"source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3",
"target": {
"file": "src/libImaging/SgiRleDecode.c",
"function": "expandrow"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
},
{
"id": "CVE-2020-5311-e7784fba",
"digest": {
"length": 2942,
"function_hash": "48429839654790430206881399079807026749"
},
"source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3",
"target": {
"file": "src/libImaging/SgiRleDecode.c",
"function": "ImagingSgiRleDecode"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-24T14:24:33Z"
}
}
],
"modified": "2026-10-24T14:24:33.463647629Z",
"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://access.redhat.com/errata/RHSA-2020:0566",
"https://access.redhat.com/errata/RHSA-2020:0580",
"https://pillow.readthedocs.io/en/stable/releasenotes/6.2.2.html",
"https://usn.ubuntu.com/4272-1/",
"https://www.debian.org/security/2020/dsa-4631",
"https://github.com/python-pillow/Pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
],
"provider_metadata": {
"unresolved_ranges": [
{
"cpes": [
"cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:*:*:*:*",
"cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*"
],
"vendor_product": "canonical:ubuntu_linux",
"extracted_events": [
{
"range": [
{
"introduced": "18.04"
},
{
"last_affected": "18.04"
},
{
"introduced": "19.10"
},
{
"last_affected": "19.10"
}
],
"source": "CPE_STRING"
}
]
},
{
"cpes": [
"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
],
"vendor_product": "debian:debian_linux",
"extracted_events": [
{
"range": [
{
"introduced": "9.0"
},
{
"last_affected": "9.0"
},
{
"introduced": "10.0"
},
{
"last_affected": "10.0"
}
],
"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-5311",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 443701,
"published_at": "2020-01-03T01:15:11.167+00:00"
}