ID CVE-2019-16865
Summary An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image.
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: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: 5.0 (as of 18-02-2020 - 16:15)
Impact:
Exploitability:
CWE CWE-770
CAPEC
  • XML Attribute Blowup
    This attack exploits certain XML parsers which manage data in an inefficient manner. The attacker crafts an XML document with many attributes in the same XML node. In a vulnerable parser, this results in a denial of service condition owhere CPU resources are exhausted because of the parsing algorithm.
  • HTTP DoS
    An attacker performs flooding at the HTTP level to bring down only a particular web application rather than anything listening on a TCP/IP connection. This denial of service attack requires substantially fewer packets to be sent which makes DoS harder to detect. This is an equivalent of SYN flood in HTTP. The idea is to keep the HTTP session alive indefinitely and then repeat that hundreds of times. This attack targets resource depletion weaknesses in web server software. The web server will wait to attacker's responses on the initiated HTTP sessions while the connection threads are being exhausted.
  • HTTP Flood
    An adversary may execute a flooding attack using the HTTP protocol with the intent to deny legitimate users access to a service by consuming resources at the application layer such as web services and their infrastructure. These attacks use legitimate session-based HTTP GET requests designed to consume large amounts of a server's resources. Since these are legitimate sessions this attack is very difficult to detect.
  • ICMP Flood
    An adversary may execute a flooding attack using the ICMP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. A typical attack involves a victim server receiving ICMP packets at a high rate from a wide range of source addresses. Additionally, due to the session-less nature of the ICMP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.
  • SOAP Array Blowup
    An adversary may execute an attack on a web service that uses SOAP messages in communication. By sending a very large SOAP array declaration to the web service, the attacker forces the web service to allocate space for the array elements before they are parsed by the XML parser. The attacker message is typically small in size containing a large array declaration of say 1,000,000 elements and a couple of array elements. This attack targets exhaustion of the memory resources of the web service.
  • XML Flood
    An adversary may execute a flooding attack using XML messages with the intent to deny legitimate users access to a web service. These attacks are accomplished by sending a large number of XML based requests and letting the service attempt to parse each one. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing. XDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that XDoS targets. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.
  • UDP Fragmentation
    An attacker may execute a UDP Fragmentation attack against a target server in an attempt to consume resources such as bandwidth and CPU. IP fragmentation occurs when an IP datagram is larger than the MTU of the route the datagram has to traverse. Typically the attacker will use large UDP packets over 1500 bytes of data which forces fragmentation as ethernet MTU is 1500 bytes. This attack is a variation on a typical UDP flood but it enables more network bandwidth to be consumed with fewer packets. Additionally it has the potential to consume server CPU resources and fill memory buffers associated with the processing and reassembling of fragmented packets.
  • TCP Flood
    An adversary may execute a flooding attack using the TCP protocol with the intent to deny legitimate users access to a service. These attacks exploit the weakness within the TCP protocol where there is some state information for the connection the server needs to maintain.
  • Amplification
    An adversary may execute an amplification where the size of a response is far greater than that of the request that generates it. The goal of this attack is to use a relatively few resources to create a large amount of traffic against a target server. To execute this attack, an adversary send a request to a 3rd party service, spoofing the source address to be that of the target server. The larger response that is generated by the 3rd party service is then sent to the target server. By sending a large number of initial requests, the adversary can generate a tremendous amount of traffic directed at the target. The greater the discrepancy in size between the initial request and the final payload delivered to the target increased the effectiveness of this attack.
  • Excessive Allocation
    An adversary causes the target to allocate excessive resources to servicing the attackers' request, thereby reducing the resources available for legitimate services and degrading or denying services. Usually, this attack focuses on memory allocation, but any finite resource on the target could be the attacked, including bandwidth, processing cycles, or other resources. This attack does not attempt to force this allocation through a large number of requests (that would be Resource Depletion through Flooding) but instead uses one or a small number of requests that are carefully formatted to force the target to allocate excessive resources to service this request(s). Often this attack takes advantage of a bug in the target to cause the target to allocate resources vastly beyond what would be needed for a normal request.
  • UDP Flood
    An adversary may execute a flooding attack using the UDP protocol with the intent to deny legitimate users access to a service by consuming the available network bandwidth. Additionally, firewalls often open a port for each UDP connection destined for a service with an open UDP port, meaning the firewalls in essence save the connection state thus the high packet nature of a UDP flood can also overwhelm resources allocated to the firewall. UDP attacks can also target services like DNS or VoIP which utilize these protocols. Additionally, due to the session-less nature of the UDP protocol, the source of a packet is easily spoofed making it difficult to find the source of the attack.
  • XML Entity Expansion
    An attacker submits an XML document to a target application where the XML document uses nested entity expansion to produce an excessively large output XML. XML allows the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.
  • XML Quadratic Expansion
    An adversary exploits a few properties of XML(substitution entities and inline DTDs) to cause a denial of service situation due to excessive memory being allocated to fully expand the XML. The result of this denial of service could cause the application to freeze or crash.
  • TCP Fragmentation
    An attacker may execute a TCP Fragmentation attack against a target with the intention of avoiding filtering rules. IP fragmentation occurs when an IP datagram is larger than the MTU of the route the datagram has to traverse. The attacker attempts to fragment the TCP packet such that the headers flag field is pushed into the second fragment which typically is not filtered. This behavior defeats some IPS and firewall filters who typically check the FLAGS in the header of the first packet since dropping this packet prevents the following fragments from being processed and assembled. Another variation is overlapping fragments thus that an innocuous first segment passes the filter and the second segment overwrites the TCP header data with the true payload which is malicious in nature. The malicious payload manipulated properly may lead to a DoS due to resource consumption or kernel crash. Additionally the fragmentation could be used in conjunction with sending fragments at a rate slightly slower than the timeout to cause a DoS condition by forcing resources that assemble the packet to wait an inordinate amount of time to complete the task. The fragmentation identification numbers could also be duplicated very easily as there are only 16 bits in IPv4 so only 65536 packets are needed.
  • XML Oversized Payloads
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an adversary to inject data that may have an adverse effect on the XML parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the XML parser, an adversary can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An adversary's goal is to leverage parser failure to his or her advantage. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing. However it is possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.231.1]. XDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that XDoS targets. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.
  • Flooding
    An adversary consumes the resources of a target by rapidly engaging in a large number of interactions with the target. This type of attack generally exposes a weakness in rate limiting or flow. When successful this attack prevents legitimate users from accessing the service and can cause the target to crash. This attack differs from resource depletion through leaks or allocations in that the latter attacks do not rely on the volume of requests made to the target but instead focus on manipulation of the target's operations. The key factor in a flooding attack is the number of requests the adversary can make in a given period of time. The greater this number, the more likely an attack is to succeed against a given target.
  • XML Ping of the Death
    An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.
  • XML Nested Payloads
    Applications often need to transform data in and out of the XML format by using an XML parser. It may be possible for an adversary to inject data that may have an adverse effect on the XML parser when it is being processed. By nesting XML data and causing this data to be continuously self-referential, an adversary can cause the XML parser to consume more resources while processing, causing excessive memory consumption and CPU utilization. An adversary's goal is to leverage parser failure to his or her advantage. In most cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing. However it may be possible to cause a crash resulting in arbitrary code execution, leading to a jump from the data plane to the control plane [R.230.1]. XDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security considerations, and so on. It is exactly these inspection, parsing, and validation routines that XDoS targets. This attack exploits the loosely coupled nature of web services, where the service provider has little to no control over the service requester and any messages the service requester sends.
  • SSL Flood
    An adversary may execute a flooding attack using the SSL protocol with the intent to deny legitimate users access to a service by consuming all the available resources on the server side. These attacks take advantage of the asymmetric relationship between the processing power used by the client and the processing power used by the server to create a secure connection. In this manner the attacker can make a large number of HTTPS requests on a low provisioned machine to tie up a disproportionately large number of resources on the server. The clients then continue to keep renegotiating the SSL connection. When multiplied by a large number of attacking machines, this attack can result in a crash or loss of service to legitimate users.
  • ICMP Fragmentation
    An attacker may execute a ICMP Fragmentation attack against a target with the intention of consuming resources or causing a crash. The attacker crafts a large number of identical fragmented IP packets containing a portion of a fragmented ICMP message. The attacker these sends these messages to a target host which causes the host to become non-responsive. Another vector may be sending a fragmented ICMP message to a target host with incorrect sizes in the header which causes the host to hang.
Access
VectorComplexityAuthentication
NETWORK LOW NONE
Impact
ConfidentialityIntegrityAvailability
NONE NONE PARTIAL
cvss-vector via4 AV:N/AC:L/Au:N/C:N/I:N/A:P
redhat via4
advisories
  • rhsa
    id RHSA-2020:0566
  • rhsa
    id RHSA-2020:0578
  • rhsa
    id RHSA-2020:0580
  • 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
refmap via4
debian DSA-4631
fedora
  • FEDORA-2019-19a161d540
  • FEDORA-2019-e7c83bdf19
misc https://pillow.readthedocs.io/en/latest/releasenotes/6.2.0.html
ubuntu USN-4272-1
Last major update 18-02-2020 - 16:15
Published 04-10-2019 - 22:15
Last modified 18-02-2020 - 16:15
Back to Top