CVE-2020-5311

Source
https://cve.org/CVERecord?id=CVE-2020-5311
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2020-5311.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2020-5311
Aliases
Downstream
Related
Published
2020-01-03T01:15:11.167Z
Modified
2026-07-09T07:51:04.046094Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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

Database specific
{
    "unresolved_ranges": [
        {
            "cpes": [
                "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:*:*:*:*",
                "cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*"
            ],
            "extracted_events": [
                {
                    "introduced": "18.04"
                },
                {
                    "last_affected": "18.04"
                },
                {
                    "introduced": "19.10"
                },
                {
                    "last_affected": "19.10"
                }
            ],
            "source": "CPE_STRING",
            "vendor_product": "canonical:ubuntu_linux"
        },
        {
            "cpes": [
                "cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*",
                "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "extracted_events": [
                {
                    "introduced": "9.0"
                },
                {
                    "last_affected": "9.0"
                },
                {
                    "introduced": "10.0"
                },
                {
                    "last_affected": "10.0"
                }
            ],
            "source": "CPE_STRING",
            "vendor_product": "debian:debian_linux"
        },
        {
            "cpes": [
                "cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:*",
                "cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*"
            ],
            "extracted_events": [
                {
                    "introduced": "30"
                },
                {
                    "last_affected": "30"
                },
                {
                    "introduced": "31"
                },
                {
                    "last_affected": "31"
                }
            ],
            "source": "CPE_STRING",
            "vendor_product": "fedoraproject:fedora"
        }
    ]
}
References

Affected packages

Git / github.com/python-pillow/pillow

Affected ranges

Type
GIT
Repo
https://github.com/python-pillow/pillow
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
{
    "cpe": "cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "6.2.2"
        }
    ],
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ]
}

Affected versions

1.*
1.0
1.2
1.7.7
1.7.8
2.*
2.0.0
2.1.0
2.2.0
2.2.1
2.3.0
2.5.0
2.7.0
2.8.0
2.8.1
2.9.0
2.9.0.dev0
2.9.0.dev1
2.9.0.dev2
3.*
3.1.0
3.1.0-rc1
3.2.0
3.3.0
3.4.0
4.*
4.0.0
4.0.0a
4.1.0
4.2.0
4.3.0
5.*
5.0.0
5.1.0
5.2.0
5.3.0
5.4.0
6.*
6.0.0
6.1.0
6.2.0
6.2.1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2020-5311.json"
vanir_signatures
[
    {
        "digest": {
            "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"
            ],
            "threshold": 0.9
        },
        "signature_type": "Line",
        "target": {
            "file": "src/libImaging/SgiRleDecode.c"
        },
        "signature_version": "v1",
        "id": "CVE-2020-5311-655a3b71",
        "deprecated": false,
        "source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
    },
    {
        "digest": {
            "length": 503.0,
            "function_hash": "23537580919283434488848292199174173919"
        },
        "signature_type": "Function",
        "target": {
            "file": "src/libImaging/SgiRleDecode.c",
            "function": "expandrow2"
        },
        "signature_version": "v1",
        "id": "CVE-2020-5311-7b789c14",
        "deprecated": false,
        "source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
    },
    {
        "digest": {
            "length": 441.0,
            "function_hash": "189928262583536917268053492207105390628"
        },
        "signature_type": "Function",
        "target": {
            "file": "src/libImaging/SgiRleDecode.c",
            "function": "expandrow"
        },
        "signature_version": "v1",
        "id": "CVE-2020-5311-df88ec3e",
        "deprecated": false,
        "source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
    },
    {
        "digest": {
            "length": 2942.0,
            "function_hash": "48429839654790430206881399079807026749"
        },
        "signature_type": "Function",
        "target": {
            "file": "src/libImaging/SgiRleDecode.c",
            "function": "ImagingSgiRleDecode"
        },
        "signature_version": "v1",
        "id": "CVE-2020-5311-e7784fba",
        "deprecated": false,
        "source": "https://github.com/python-pillow/pillow/commit/a79b65c47c7dc6fe623aadf09aa6192fc54548f3"
    }
]
vanir_signatures_modified
"2026-07-09T07:51:04Z"