GitHub Advisoryadvisory · PyPI

GHSA-hr8g-f6r6-mr22 Buffer over-flow in Pillow

HIGH Published 2022-05-26 Modified 2024-11-26 Official page ↗
Aliases
CVE-2022-30595
Ecosystem
PyPI
Packages
Pillow
Severity
High
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weaknesses
CWE-120
Reviewed
2022-06-01

Affected packages

• PyPI Pillow: >= 9.1.0, < 9.1.1 → fixed in 9.1.1

Description

When reading a TGA file with RLE packets that cross scan lines, Pillow reads the information past the end of the first line without deducting that from the length of the remaining file data. This vulnerability was introduced in Pillow 9.1.0, and can cause a heap buffer overflow. Opening an image with a zero or negative height has been found to bypass a decompression bomb check. This will now raise a SyntaxError instead, in turn raising a PIL.UnidentifiedImageError.

Related

Alias · CVE (1)

  • CVE-2022-30595 libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. vulnerability

Weakness · CWE (1)

  • CWE-120 Buffer Copy without Checking Size of Input weakness

References