PT-2022-3459 · Pillow · Pillow
Published
2022-05-25
·
Updated
2025-01-14
·
CVE-2022-30595
CVSS v2.0
10
Critical
| Vector | AV: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
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Pillow