ID CVE-2020-5312
Summary libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow.
References
Vulnerable Configurations
  • cpe:2.3:a:python:pillow:1.7.8:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:1.7.8:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.2.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.2.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.3.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.3.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.5.3:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.5.3:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.0:rc1:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.0:rc1:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.6.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.6.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.7.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.7.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.8.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.8.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.8.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.8.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.8.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.8.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:dev0:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:dev0:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:dev1:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:dev1:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:2.9.0:dev2:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:2.9.0:dev2:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.0.0:rc1:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.0.0:rc1:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.3.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.3.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.3.2:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.3.2:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:3.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:3.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.1.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.1.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.2.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.2.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:4.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:4.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.1.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.1.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.2.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.3.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.3.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.4.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.4.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:5.4.1:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:5.4.1:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:6.0.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:6.0.0:*:*:*:*:*:*:*
  • cpe:2.3:a:python:pillow:6.2.0:*:*:*:*:*:*:*
    cpe:2.3:a:python:pillow:6.2.0:*:*:*:*:*:*:*
  • cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:esm:*:*:*
    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:16.04:*:*:*:lts:*:*:*
  • cpe:2.3:o:canonical:ubuntu_linux:18.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:canonical:ubuntu_linux:19.10:*:*:*:*:*:*:*
  • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
    cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
    cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:30:*:*:*:*:*:*:*
  • cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*
    cpe:2.3:o:fedoraproject:fedora:31:*:*:*:*:*:*:*
CVSS
Base: 7.5 (as of 10-07-2020 - 17:09)
Impact:
Exploitability:
CWE CWE-120
CAPEC
  • Overflow Variables and Tags
    This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The attacker crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.
  • Buffer Overflow in an API Call
    This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An attacker who has access to an API may try to embed malicious code in the API function call and exploit a buffer overflow vulnerability in the function's implementation. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.
  • String Format Overflow in syslog()
    This attack targets the format string vulnerabilities in the syslog() function. An attacker would typically inject malicious input in the format string parameter of the syslog function. This is a common problem, and many public vulnerabilities and associated exploits have been posted.
  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • Buffer Overflow via Parameter Expansion
    In this attack, the target software is given input that the attacker knows will be modified and expanded in size during processing. This attack relies on the target software failing to anticipate that the expanded data may exceed some internal limit, thereby creating a buffer overflow.
  • Buffer Overflow in Local Command-Line Utilities
    This attack targets command-line utilities available in a number of shells. An attacker can leverage a vulnerability found in a command-line utility to escalate privilege to root.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Overflow Binary Resource File
    An attack of this type exploits a buffer overflow vulnerability in the handling of binary resources. Binary resources may include music files like MP3, image files like JPEG files, and any other binary file. These attacks may pass unnoticed to the client machine through normal usage of files, such as a browser loading a seemingly innocent JPEG file. This can allow the attacker access to the execution stack and execute arbitrary code in the target process. This attack pattern is a variant of standard buffer overflow attacks using an unexpected vector (binary files) to wrap its attack and open up a new attack vector. The attacker is required to either directly serve the binary content to the victim, or place it in a locale like a MP3 sharing application, for the victim to download. The attacker then is notified upon the download or otherwise locates the vulnerability opened up by the buffer overflow.
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
  • Buffer Overflow via Symbolic Links
    This type of attack leverages the use of symbolic links to cause buffer overflows. An attacker can try to create or manipulate a symbolic link file such that its contents result in out of bounds data. When the target software processes the symbolic link file, it could potentially overflow internal buffers with insufficient bounds checking.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an adversary. As a consequence, an adversary is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the adversaries' choice.
  • Forced Integer Overflow
    This attack forces an integer variable to go out of range. The integer variable is often used as an offset such as size of memory allocation or similarly. The attacker would typically control the value of such variable and try to get it out of range. For instance the integer in question is incremented past the maximum possible value, it may wrap to become a very small, or negative number, therefore providing a very incorrect value which can lead to unexpected behavior. At worst the attacker can execute arbitrary code.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL PARTIAL PARTIAL
cvss-vector via4 AV:N/AC:L/Au:N/C:P/I:P/A:P
redhat via4
advisories
  • bugzilla
    id 1789533
    title CVE-2020-5312 python-pillow: improperly restricted operations on memory buffer in libImaging/PcxDecode.c
    oval
    OR
    • comment Red Hat Enterprise Linux must be installed
      oval oval:com.redhat.rhba:tst:20070304026
    • AND
      • comment Red Hat Enterprise Linux 7 is installed
        oval oval:com.redhat.rhba:tst:20150364027
      • OR
        • AND
          • comment python-pillow is earlier than 0:2.0.0-20.gitd1c6db8.el7_7
            oval oval:com.redhat.rhsa:tst:20200578001
          • comment python-pillow is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200578002
        • AND
          • comment python-pillow-devel is earlier than 0:2.0.0-20.gitd1c6db8.el7_7
            oval oval:com.redhat.rhsa:tst:20200578003
          • comment python-pillow-devel is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200578004
        • AND
          • comment python-pillow-doc is earlier than 0:2.0.0-20.gitd1c6db8.el7_7
            oval oval:com.redhat.rhsa:tst:20200578005
          • comment python-pillow-doc is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200578006
        • AND
          • comment python-pillow-qt is earlier than 0:2.0.0-20.gitd1c6db8.el7_7
            oval oval:com.redhat.rhsa:tst:20200578007
          • comment python-pillow-qt is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200578008
        • AND
          • comment python-pillow-sane is earlier than 0:2.0.0-20.gitd1c6db8.el7_7
            oval oval:com.redhat.rhsa:tst:20200578009
          • comment python-pillow-sane is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200578010
        • AND
          • comment python-pillow-tk is earlier than 0:2.0.0-20.gitd1c6db8.el7_7
            oval oval:com.redhat.rhsa:tst:20200578011
          • comment python-pillow-tk is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200578012
    rhsa
    id RHSA-2020:0578
    released 2020-02-24
    severity Important
    title RHSA-2020:0578: python-pillow security update (Important)
  • bugzilla
    id 1789535
    title CVE-2020-5311 python-pillow: out-of-bounds write in expandrow in libImaging/SgiRleDecode.c
    oval
    OR
    • comment Red Hat Enterprise Linux must be installed
      oval oval:com.redhat.rhba:tst:20070304026
    • AND
      • comment Red Hat Enterprise Linux 8 is installed
        oval oval:com.redhat.rhba:tst:20193384074
      • OR
        • AND
          • comment python-pillow-debugsource is earlier than 0:5.1.1-10.el8_1
            oval oval:com.redhat.rhsa:tst:20200580001
          • comment python-pillow-debugsource is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200580002
        • AND
          • comment python3-pillow is earlier than 0:5.1.1-10.el8_1
            oval oval:com.redhat.rhsa:tst:20200580003
          • comment python3-pillow is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200580004
    rhsa
    id RHSA-2020:0580
    released 2020-02-24
    severity Important
    title RHSA-2020:0580: python-pillow security update (Important)
  • bugzilla
    id 1789533
    title CVE-2020-5312 python-pillow: improperly restricted operations on memory buffer in libImaging/PcxDecode.c
    oval
    OR
    • comment Red Hat Enterprise Linux must be installed
      oval oval:com.redhat.rhba:tst:20070304026
    • AND
      • comment Red Hat Enterprise Linux 6 is installed
        oval oval:com.redhat.rhba:tst:20111656003
      • OR
        • AND
          • comment python-imaging is earlier than 0:1.1.6-20.el6_10
            oval oval:com.redhat.rhsa:tst:20200898001
          • comment python-imaging is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200898002
        • AND
          • comment python-imaging-devel is earlier than 0:1.1.6-20.el6_10
            oval oval:com.redhat.rhsa:tst:20200898003
          • comment python-imaging-devel is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200898004
        • AND
          • comment python-imaging-sane is earlier than 0:1.1.6-20.el6_10
            oval oval:com.redhat.rhsa:tst:20200898005
          • comment python-imaging-sane is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200898006
        • AND
          • comment python-imaging-tk is earlier than 0:1.1.6-20.el6_10
            oval oval:com.redhat.rhsa:tst:20200898007
          • comment python-imaging-tk is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20200898008
    rhsa
    id RHSA-2020:0898
    released 2020-03-18
    severity Important
    title RHSA-2020:0898: python-imaging security update (Important)
  • rhsa
    id RHSA-2020:0566
  • rhsa
    id RHSA-2020:0681
  • rhsa
    id RHSA-2020:0683
  • rhsa
    id RHSA-2020:0694
rpms
  • python-pillow-debuginfo-0:5.1.1-10.el8_0
  • python-pillow-debugsource-0:5.1.1-10.el8_0
  • python3-pillow-0:5.1.1-10.el8_0
  • python3-pillow-debuginfo-0:5.1.1-10.el8_0
  • python3-pillow-tk-debuginfo-0:5.1.1-10.el8_0
  • python-pillow-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-debuginfo-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-devel-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-doc-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-qt-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-sane-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-tk-0:2.0.0-20.gitd1c6db8.el7_7
  • python-pillow-debuginfo-0:5.1.1-10.el8_1
  • python-pillow-debugsource-0:5.1.1-10.el8_1
  • python3-pillow-0:5.1.1-10.el8_1
  • python3-pillow-debuginfo-0:5.1.1-10.el8_1
  • python3-pillow-tk-debuginfo-0:5.1.1-10.el8_1
  • python-imaging-0:1.1.6-20.el6_10
  • python-imaging-debuginfo-0:1.1.6-20.el6_10
  • python-imaging-devel-0:1.1.6-20.el6_10
  • python-imaging-sane-0:1.1.6-20.el6_10
  • python-imaging-tk-0:1.1.6-20.el6_10
refmap via4
debian DSA-4631
fedora
  • FEDORA-2020-5cdbb19cca
  • FEDORA-2020-df444e464e
misc
ubuntu USN-4272-1
Last major update 10-07-2020 - 17:09
Published 03-01-2020 - 01:15
Last modified 10-07-2020 - 17:09
Back to Top