CVE-2020-5312
CVE-2020-5312 is a critical-severity vulnerability in Python Pillow with a CVSS 3.x base score of 9.8. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-120.
Key facts
- Severity: Critical (CVSS 3.x base score 9.8)
- CVSS v2: 7.5
- EPSS exploit prediction: 4% (88th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-120
- Affected product: Python Pillow
- Published:
- Last modified:
Description
libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow.
Frequently asked questions
- What is CVE-2020-5312?
- libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow.
- How severe is CVE-2020-5312?
- CVE-2020-5312 has a CVSS 3.x base score of 9.8, rated critical severity. It is exploitable over network with low attack complexity, requires no privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
- Is CVE-2020-5312 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 4% (88th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2020-5312?
- CVE-2020-5312 primarily affects Python Pillow. In total, 9 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2020-5312?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
- When was CVE-2020-5312 published?
- CVE-2020-5312 was published on 2020-01-03 and last updated on 2026-06-17.
References
- https://access.redhat.com/errata/RHSA-2020:0566
- https://access.redhat.com/errata/RHSA-2020:0578
- https://access.redhat.com/errata/RHSA-2020:0580
- https://access.redhat.com/errata/RHSA-2020:0681
- https://access.redhat.com/errata/RHSA-2020:0683
- https://access.redhat.com/errata/RHSA-2020:0694
- https://github.com/python-pillow/Pillow/commit/93b22b846e0269ee9594ff71a72bec02d2bea8fd
- 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://www.debian.org/security/2020/dsa-4631
Affected products (9)
- cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*
- cpe:2.3:o:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
- cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*
More vulnerabilities in Python Pillow
- CVE-2014-3007 — Critical (CVSS 10.0): Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands…
- CVE-2022-30595 — Critical (CVSS 9.8): libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.
- CVE-2022-22817 — Critical (CVSS 9.8): PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python…
- CVE-2021-34552 — Critical (CVSS 9.8): Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters…
- CVE-2021-25289 — Critical (CVSS 9.8): An issue was discovered in Pillow before 8.1.1. TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr…
- CVE-2020-5311 — Critical (CVSS 9.8): libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.
All CVEs affecting Python Pillow →
Other CWE-120 (Classic Buffer Overflow) vulnerabilities
- CVE-2025-48611 — Critical (CVSS 10.0): In DeviceId of DeviceId.java, there is a possible desync in persistence due to a missing bounds check. This could lead…
- CVE-2026-24823 — Critical (CVSS 10.0): Out-of-bounds Write, Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') vulnerability in FASTSHIFT…
- CVE-2026-24810 — Critical (CVSS 10.0): Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') vulnerability in rethinkdb (src/cjson modules).…
- CVE-2026-24800 — Critical (CVSS 10.0): Out-of-bounds Write, Buffer Copy without Checking Size of Input ('Classic Buffer Overflow') vulnerability in tildearrow…
- CVE-2025-9962 — Critical (CVSS 10.0): A buffer overflow vulnerability in Novakon P series allows attackers to gain root permission without prior…
- CVE-2010-10016 — Critical (CVSS 10.0): BS.Player version 2.57 (build 1051) contains a vulnerability in its playlist import functionality. When processing .m3u…
Browse all CWE-120 (Classic Buffer Overflow) vulnerabilities →