Skip to content

Buffer over-flow in Pillow

High severity GitHub Reviewed Published May 26, 2022 to the GitHub Advisory Database • Updated Apr 2, 2024

Package

pip Pillow (pip)

Affected versions

= 9.1.0

Patched versions

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.

References

Published by the National Vulnerability Database May 25, 2022
Published to the GitHub Advisory Database May 26, 2022
Reviewed Jun 1, 2022
Last updated Apr 2, 2024

Severity

High

Weaknesses

CVE ID

CVE-2022-30595

GHSA ID

GHSA-hr8g-f6r6-mr22

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.