Vulnerabilities

11 via 11 paths

Dependencies

11

Source

GitHub

Commit

8e7781f1

Find, fix and prevent vulnerabilities in your code.

Severity
  • 1
  • 5
  • 2
  • 3
Status
  • 11
  • 0
  • 0

critical severity

Heap-based Buffer Overflow

  • Vulnerable module: pillow
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 pillow@9.5.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

Pillow is a PIL (Python Imaging Library) fork.

Affected versions of this package are vulnerable to Heap-based Buffer Overflow when the ReadHuffmanCodes() function is used. An attacker can craft a special WebP lossless file that triggers the ReadHuffmanCodes() function to allocate the HuffmanCode buffer with a size that comes from an array of precomputed sizes: kTableSize. The color_cache_bits value defines which size to use. The kTableSize array only takes into account sizes for 8-bit first-level table lookups but not second-level table lookups. libwebp allows codes that are up to 15-bit (MAX_ALLOWED_CODE_LENGTH). When BuildHuffmanTable() attempts to fill the second-level tables it may write data out-of-bounds. The OOB write to the undersized array happens in ReplicateValue.

Notes:

This is only exploitable if the color_cache_bits value defines which size to use.

This vulnerability was also published on libwebp CVE-2023-5129

Changelog:

2023-09-12: Initial advisory publication

2023-09-27: Advisory details updated, including CVSS, references

2023-09-27: CVE-2023-5129 rejected as a duplicate of CVE-2023-4863

2023-09-28: Research and addition of additional affected libraries

2024-01-28: Additional fix information

Remediation

Upgrade Pillow to version 10.0.1 or higher.

References

high severity

Eval Injection

  • Vulnerable module: pillow
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 pillow@9.5.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

Affected versions of this package are vulnerable to Eval Injection via the PIL.ImageMath.eval function when an attacker has control over the keys passed to the environment argument.

PoC

from PIL import Image, ImageMath

image1 = Image.open('__class__')
image2 = Image.open('__bases__')
image3 = Image.open('__subclasses__')
image4 = Image.open('load_module')
image5 = Image.open('system')

expression = "().__class__.__bases__[0].__subclasses__()[104].load_module('os').system('whoami')"

environment = {
    image1.filename: image1,
    image2.filename: image2,
    image3.filename: image3,
    image4.filename: image4,
    image5.filename: image5
}

ImageMath.eval(expression, **environment)

Remediation

Upgrade pillow to version 10.2.0 or higher.

References

high severity

XML External Entity (XXE) Injection

  • Vulnerable module: fonttools
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 fonttools@4.38.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

fonttools is a Tools to manipulate font files

Affected versions of this package are vulnerable to XML External Entity (XXE) Injection via the OT-SVG parser in the svg.py file.

Details

XXE Injection is a type of attack against an application that parses XML input. XML is a markup language that defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. By default, many XML processors allow specification of an external entity, a URI that is dereferenced and evaluated during XML processing. When an XML document is being parsed, the parser can make a request and include the content at the specified URI inside of the XML document.

Attacks can include disclosing local files, which may contain sensitive data such as passwords or private user data, using file: schemes or relative paths in the system identifier.

For example, below is a sample XML document, containing an XML element- username.

<xml>
<?xml version="1.0" encoding="ISO-8859-1"?>
   <username>John</username>
</xml>

An external XML entity - xxe, is defined using a system identifier and present within a DOCTYPE header. These entities can access local or remote content. For example the below code contains an external XML entity that would fetch the content of /etc/passwd and display it to the user rendered by username.

<xml>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE foo [
   <!ENTITY xxe SYSTEM "file:///etc/passwd" >]>
   <username>&xxe;</username>
</xml>

Other XXE Injection attacks can access local resources that may not stop returning data, possibly impacting application availability and leading to Denial of Service.

Remediation

Upgrade fonttools to version 4.43.0 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: pillow
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 pillow@9.5.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS) when using arbitrary strings as text input and the number of characters passed into PIL.ImageFont.ImageFont.getmask() is over a certain limit. This can lead to a system crash.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade pillow to version 10.2.0 or higher.

References

high severity

Denial of Service (DoS)

  • Vulnerable module: pillow
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 pillow@9.5.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

Affected versions of this package are vulnerable to Denial of Service (DoS) if the size of individual glyphs extends beyond the bitmap image, when using PIL.ImageFont.ImageFont function. Exploiting this vulnerability could lead to a system crash.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade pillow to version 10.2.0 or higher.

References

high severity

Uncontrolled Resource Consumption ('Resource Exhaustion')

  • Vulnerable module: pillow
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 pillow@9.5.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

Affected versions of this package are vulnerable to Uncontrolled Resource Consumption ('Resource Exhaustion') when the ImageFont truetype in an ImageDraw instance operates on a long text argument. An attacker can cause the service to crash by processing a task that uncontrollably allocates memory.

Remediation

Upgrade pillow to version 10.0.0 or higher.

References

medium severity

XML Injection

  • Vulnerable module: fonttools
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 fonttools@4.38.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

fonttools is a Tools to manipulate font files

Affected versions of this package are vulnerable to XML Injection via the main() function in the fontTools/varLib/__init__.py file. An attacker can write files to the filesystem by supplying a specially crafted .designspace file.

Remediation

Upgrade fonttools to version 4.61.0 or higher.

References

medium severity

Buffer Overflow

  • Vulnerable module: pillow
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 pillow@9.5.0
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

Affected versions of this package are vulnerable to Buffer Overflow via the strcpy function in _imagingcms.c, due to two calls that were able to copy too much data into fixed length strings.

Remediation

Upgrade pillow to version 10.3.0 or higher.

References

low severity

Buffer Overflow

  • Vulnerable module: numpy
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 numpy@1.21.3
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

numpy is a fundamental package needed for scientific computing with Python.

Affected versions of this package are vulnerable to Buffer Overflow due to missing boundary checks in the array_from_pyobj function of fortranobject.c. This may allow an attacker to conduct Denial of Service by carefully constructing an array with negative values.

Remediation

Upgrade numpy to version 1.22.0 or higher.

References

low severity

Denial of Service (DoS)

  • Vulnerable module: numpy
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 numpy@1.21.3
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

numpy is a fundamental package needed for scientific computing with Python.

Affected versions of this package are vulnerable to Denial of Service (DoS) due to an incomplete string comparison in the numpy.core component, which may allow attackers to fail the APIs via constructing specific string objects.

Details

Denial of Service (DoS) describes a family of attacks, all aimed at making a system inaccessible to its intended and legitimate users.

Unlike other vulnerabilities, DoS attacks usually do not aim at breaching security. Rather, they are focused on making websites and services unavailable to genuine users resulting in downtime.

One popular Denial of Service vulnerability is DDoS (a Distributed Denial of Service), an attack that attempts to clog network pipes to the system by generating a large volume of traffic from many machines.

When it comes to open source libraries, DoS vulnerabilities allow attackers to trigger such a crash or crippling of the service by using a flaw either in the application code or from the use of open source libraries.

Two common types of DoS vulnerabilities:

  • High CPU/Memory Consumption- An attacker sending crafted requests that could cause the system to take a disproportionate amount of time to process. For example, commons-fileupload:commons-fileupload.

  • Crash - An attacker sending crafted requests that could cause the system to crash. For Example, npm ws package

Remediation

Upgrade numpy to version 1.22.0rc1 or higher.

References

low severity

NULL Pointer Dereference

  • Vulnerable module: numpy
  • Introduced through: matplotlib@3.5.3

Detailed paths

  • Introduced through: packing-box/python-exeplot@packing-box/python-exeplot#8e7781f1c19fb11f99b5de2604cffbc1a0238f75 matplotlib@3.5.3 numpy@1.21.3
    Remediation: Upgrade to matplotlib@3.5.3.

Overview

numpy is a fundamental package needed for scientific computing with Python.

Affected versions of this package are vulnerable to NULL Pointer Dereference due to missing return-value validation in the PyArray_DescrNew function, which may allow attackers to conduct Denial of Service attacks by repetitively creating and sort arrays.

Note: This may likely only happen if application memory is already exhausted, as it requires the newdescr object of the PyArray_DescrNew to evaluate to NULL.

Remediation

Upgrade numpy to version 1.22.2 or higher.

References