CVE-2022-30595: Buffer Overflow

Published May 25, 2022
·
Updated

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.

Other sources

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.

— GitHub

Affected Software

15 affected componentsFixes available
pip/pillow=9.1.0
9.1.1
Python Pillow=9.1.0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
alpine/py3-pillow<9.1.1-r0
9.1.1-r0
debian/pillow<9.1.1-1
9.1.1-1
debian/pillow<9.1.1-1
9.1.1-1
debian/pillow<9.1.1-1
9.1.1-1
debian/pillow
9.1.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/Pillow to a version that resolves this vulnerability.

    Fixed in 9.1.1
  2. Upgrade

    Upgrade alpine/py3-pillow to a version that resolves this vulnerability.

    Fixed in 9.1.1-r0
  3. Upgrade

    Upgrade debian/pillow to a version that resolves this vulnerability.

    Fixed in 9.1.1-1

Event History

May 25, 2022
CVE Published
via MITRE·11:46 AM
Data Sourced
via MITRE·11:46 AM
Description
Data Sourced
12:15 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·12:15 PM
DescriptionAffected Software
May 26, 2022
Advisory Published
via GitHub·12:01 AM
Data Sourced
via GitHub·12:01 AM
DescriptionWeaknessAffected Software
Apr 2, 2024
Advisory Published
via GitHub·08:39 PM
Nov 21, 2024
Updated
via NVD·07:02 AM
Affected Software
Nov 26, 2024
Data Sourced
via GitHub·06:41 PM
Severity
Jun 17, 2026
Updated
via NVD·04:43 AM
Affected Software
Nov 3, 2026
Data Sourced
via OSV·08:04 AM
Severity

Frequently Asked Questions

1

What is the vulnerability ID for Pillow 9.1.0?

The vulnerability ID for Pillow 9.1.0 is CVE-2022-30595.

2

What is the severity of CVE-2022-30595?

The severity of CVE-2022-30595 is critical with a severity score of 9.8.

3

What is the affected software for CVE-2022-30595?

The affected software for CVE-2022-30595 is Pillow 9.1.0.

4

What is the description of CVE-2022-30595?

CVE-2022-30595 is a heap buffer overflow vulnerability in the processing of invalid TGA image files in Pillow 9.1.0.

5

How can I fix CVE-2022-30595?

To fix CVE-2022-30595, update your Pillow installation to version 9.1.1 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203