PT-2022-3459 · Pillow · Pillow

Published

2022-05-25

·

Updated

2025-01-14

·

CVE-2022-30595

CVSS v2.0

10

Critical

VectorAV:N/AC:L/Au:N/C:C/I:C/A:C
Name of the Vulnerable Software and Affected Versions Pillow version 9.1.0
Description The issue is related to a heap buffer overflow in the processing of invalid TGA image files. This can be exploited by a remote attacker to impact the confidentiality, integrity, and availability of protected information. The vulnerability occurs when reading a TGA file with RLE packets that cross scan lines, causing Pillow to read past the end of the first line without adjusting the length of the remaining file data. Additionally, opening an image with a zero or negative height can bypass a decompression bomb check, now raising a SyntaxError and a PIL.UnidentifiedImageError.
Recommendations For Pillow version 9.1.0, consider updating to a newer version that addresses the heap buffer overflow issue in the libImaging/TgaRleDecode.c component. As a temporary workaround, restrict the use of the libImaging/TgaRleDecode.c component when processing TGA image files until a patch is available. Avoid using the TgaRleDecode function to decode TGA images with RLE packets that cross scan lines.

Exploit

Fix

Buffer Overflow

Memory Corruption

Weakness Enumeration

Related Identifiers

BDU:2022-04237
BIT-PILLOW-2022-30595
CVE-2022-30595
GHSA-HR8G-F6R6-MR22
MGASA-2023-0164
OPENSUSE-SU-2024:12111-1
OPENSUSE-SU-2025:14645-1
PYSEC-2022-43145

Affected Products

Pillow