Skip to content
Noroxi
CVE-2020-5311· NVD / CVE Program· CNA mitre

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

CriticalCVSS 9.8 · v3.1—No exploit Fix available

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help
Published
Jan 2, 2020
Updated
Jun 16, 2026
EPSS
4.2% · 91th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

40

Plan

Add it to your regular patch cycle.

CVSS
39 / 40 · 9.8 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 4.2%

Affected systems

VendorProduct
pythonpillow
canonicalubuntu linux
debiandebian linux
fedoraprojectfedora

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • canonical ubuntu linux18.04
  • canonical ubuntu linux19.10
  • debian debian linux10.0
  • debian debian linux9.0
  • fedoraproject fedora30
  • fedoraproject fedora31
  • python pillowbefore 6.2.2

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Alpine:v3.12py3-pillowbefore 6.2.2-r06.2.2-r0
Debian:12pillowbefore 7.0.0-17.0.0-1
PyPIpillowbefore 6.2.26.2.2
Red Hat:enterprise_linux:8::appstreampython-pillowbefore 0:5.1.1-10.el8_10:5.1.1-10.el8_1
Red Hat:enterprise_linux:8::appstreampython-pillow-debuginfobefore 0:5.1.1-10.el8_10:5.1.1-10.el8_1
Red Hat:enterprise_linux:8::appstreampython-pillow-debugsourcebefore 0:5.1.1-10.el8_10:5.1.1-10.el8_1
Red Hat:enterprise_linux:8::appstreampython3-pillowbefore 0:5.1.1-10.el8_10:5.1.1-10.el8_1
Red Hat:enterprise_linux:8::appstreampython3-pillow-debuginfobefore 0:5.1.1-10.el8_10:5.1.1-10.el8_1
Red Hat:enterprise_linux:8::appstreampython3-pillow-tk-debuginfobefore 0:5.1.1-10.el8_10:5.1.1-10.el8_1
Red Hat:rhel_e4s:8.0::appstreampython-pillowbefore 0:5.1.1-10.el8_00:5.1.1-10.el8_0
Red Hat:rhel_e4s:8.0::appstreampython-pillow-debuginfobefore 0:5.1.1-10.el8_00:5.1.1-10.el8_0
Red Hat:rhel_e4s:8.0::appstreampython-pillow-debugsourcebefore 0:5.1.1-10.el8_00:5.1.1-10.el8_0
Red Hat:rhel_e4s:8.0::appstreampython3-pillowbefore 0:5.1.1-10.el8_00:5.1.1-10.el8_0
Red Hat:rhel_e4s:8.0::appstreampython3-pillow-debuginfobefore 0:5.1.1-10.el8_00:5.1.1-10.el8_0
Red Hat:rhel_e4s:8.0::appstreampython3-pillow-tk-debuginfobefore 0:5.1.1-10.el8_00:5.1.1-10.el8_0
SUSE:OpenStack Cloud 9ansible1before 1.9.6-9.7.21.9.6-9.7.2
SUSE:OpenStack Cloud 9ardana-ansiblebefore 9.0+git.1591138508.e269bdb-3.22.29.0+git.1591138508.e269bdb-3.22.2
SUSE:OpenStack Cloud 9ardana-cobblerbefore 9.0+git.1588181228.bae3b1f-3.13.29.0+git.1588181228.bae3b1f-3.13.2
SUSE:OpenStack Cloud 9ardana-glancebefore 9.0+git.1593631708.9354a78-3.13.29.0+git.1593631708.9354a78-3.13.2
SUSE:OpenStack Cloud 9ardana-input-modelbefore 9.0+git.1589740948.c24fc0b-3.19.29.0+git.1589740948.c24fc0b-3.19.2
SUSE:OpenStack Cloud 9ardana-loggingbefore 9.0+git.1591193994.d93b668-3.13.29.0+git.1591193994.d93b668-3.13.2
SUSE:OpenStack Cloud 9ardana-manilabefore 9.0+git.1594158642.b5905e4-3.12.29.0+git.1594158642.b5905e4-3.12.2
SUSE:OpenStack Cloud 9ardana-monascabefore 9.0+git.1589385256.7fbfaaf-3.19.29.0+git.1589385256.7fbfaaf-3.19.2
SUSE:OpenStack Cloud 9ardana-mqbefore 9.0+git.1593618110.cbd1a37-3.16.29.0+git.1593618110.cbd1a37-3.16.2

+56

Other highest-scoring records for the same primary product.

  • CVE-2014-3007Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands via shell metacharact
    43Plan
  • CVE-2016-4009Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote attackers to have u
    41Plan
  • CVE-2022-30595libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.
    40Plan
  • CVE-2022-22817PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method.
    40Plan
  • CVE-2021-34552Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters directly into a conv
    40Plan
  • CVE-2021-25289An issue was discovered in Pillow before 8.1.1.
    40Plan

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
alpine:py3-pillow6.2.2-r0 · Alpine:v3.12Package registry (OSV)
debian:pillow7.0.0-1 · Debian:12Package registry (OSV)
PyPI:pillow6.2.2Package registry (OSV)
red hat:python-pillow0:5.1.1-10.el8_0 · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
red hat:python-pillow-debuginfo0:5.1.1-10.el8_0 · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
red hat:python-pillow-debugsource0:5.1.1-10.el8_0 · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
red hat:python3-pillow0:5.1.1-10.el8_0 · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
red hat:python3-pillow-debuginfo0:5.1.1-10.el8_0 · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
red hat:python3-pillow-tk-debuginfo0:5.1.1-10.el8_0 · Red Hat:rhel_e4s:8.0::appstreamPackage registry (OSV)
suse:ansible11.9.6-9.7.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-ansible9.0+git.1591138508.e269bdb-3.22.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-cobbler9.0+git.1588181228.bae3b1f-3.13.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-glance9.0+git.1593631708.9354a78-3.13.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-input-model9.0+git.1589740948.c24fc0b-3.19.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-logging9.0+git.1591193994.d93b668-3.13.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-manila9.0+git.1594158642.b5905e4-3.12.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-monasca9.0+git.1589385256.7fbfaaf-3.19.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-mq9.0+git.1593618110.cbd1a37-3.16.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-neutron9.0+git.1590756257.e09d54f-3.22.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-octavia9.0+git.1590079609.a2ae6ab-3.19.2 · SUSE:OpenStack Cloud 9Package registry (OSV)
suse:ardana-tempest9.0+git.1593033709.9495bb2-3.16.2 · SUSE:OpenStack Cloud 9Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
high · data or configuration can be modified
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
High
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

nvd-primary

Root cause

When data is copied, the source length is not compared with the size of the destination buffer. Excess data overwrites adjacent memory.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

c
char buf[256];memcpy(buf, pkt->data, pkt->len);

Fixed

c
char buf[256];if (pkt->len > sizeof(buf)) {  return -EINVAL;}memcpy(buf, pkt->data, pkt->len);

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records