Advisory

GHSA-hr8g-f6r6-mr22

Also known as: BIT-pillow-2022-30595, CVE-2022-30595, PYSEC-2022-43145

Summary

Buffer over-flow in Pillow

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2022-05-26 00:01 UTC
Modified
2024-11-26 18:40 UTC

Affected packages and fixes

pillow

PyPI · All systems

Affected

  • introduced 9.1.0, fixed 9.1.1 (ecosystem)

Fixed versions

9.1.1

Fix

  • Fixed version 9.1.1
    pip install --upgrade pillow==9.1.1

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences