Every CVE Search/ Get API key

CVE-2022-30595

Buffer over-flow in Pillow

9.8 CriticalFix available

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

2.33%Up 1.4 points since May 26, 2022
90%50%10%1%

What each source reports

NVD Score used 9.8

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

Record
CVE-2022-30595
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-787
Updated
2026-11-02
CVE List No score

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

Record
CVE-2022-30595
Updated
2026-11-02
EUVDEUVD-2022-0201 No score

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

Record
EUVD-2022-0201
Updated
2026-11-03
GitHub AdvisoriesGHSA-hr8g-f6r6-mr22 8.7

Buffer over-flow in Pillow

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.

Record
GHSA-hr8g-f6r6-mr22
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-120
Updated
2026-11-02
OSVALPINE-CVE-2022-30595 9.8

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

Record
ALPINE-CVE-2022-30595
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
OSVDEBIAN-CVE-2022-30595 9.8

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

Record
DEBIAN-CVE-2022-30595
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
Show 8 moreShow less
OSVGHSA-hr8g-f6r6-mr22 8.7

Buffer over-flow in Pillow

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.

Record
GHSA-hr8g-f6r6-mr22
CVSS 4.0
8.7 HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-120
Updated
2026-11-02
OSVPYSEC-2022-43145 9.8

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

Record
PYSEC-2022-43145
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2022-30595 9.8

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

Record
UBUNTU-CVE-2022-30595
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVBIT-pillow-2022-30595 No score

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

Record
BIT-pillow-2022-30595
Updated
2026-11-02
OSV No score

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

Record
CVE-2022-30595
Updated
2026-11-02
OSVMGASA-2023-0164 No score

Updated python-pillow packages fix security vulnerability

libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. (CVE-2022-30595) Improper Handling of Highly Compressed GIF Data (Data Amplification). (CVE-2022-45198)

Record
MGASA-2023-0164
Updated
2026-11-02
OSVopenSUSE-SU-2024:12111-1 No score

python310-Pillow-9.1.1-1.1 on GA media

These are all security issues fixed in the python310-Pillow-9.1.1-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:12111-1
Updated
2026-11-02
OSVopenSUSE-SU-2025:14645-1 No score

python311-Pillow-11.1.0-1.1 on GA media

These are all security issues fixed in the python311-Pillow-11.1.0-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2025:14645-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
pillow
PyPI
9.1.0 to 9.1.0
9.1.1
py3-pillow
Alpine:v3.16
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.17
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.18
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.19
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.20
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.21
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.22
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.23
before 9.1.1-r0
9.1.1-r0
py3-pillow
Alpine:v3.24
before 9.1.1-r0
9.1.1-r0
Show 8 moreShow less
Affected packages
PackageAffectedFixed
pillow
Bitnami
9.1.0 up to 9.1.1
9.1.1
pillow
Debian:12
before 9.1.1-1
9.1.1-1
pillow
Debian:13
before 9.1.1-1
9.1.1-1
pillow
Debian:14
before 9.1.1-1
9.1.1-1
pillow
PyPI
9.1.0 up to 9.1.1
9.1.1
python-pillow
Mageia:8
From an advisory covering 2 CVEs
before 9.2.0-1.mga8
9.2.0-1.mga8
python-Pillow
openSUSE:Tumbleweed
before 9.1.1-1.1
9.1.1-1.1
python-Pillow
openSUSE:Tumbleweed
From an advisory covering 3 CVEs
before 11.1.0-1.1
11.1.0-1.1

History

History
RecordedChangedSources
affected, factsOSV
affected, aliases, referencesOSV
affected
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2022-30595 is a critical vulnerability (CVSS 9.8) in Python Pillow, published May 25, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.33%, the 83rd percentile. Fixed in pillow 9.1.1.

References

Show 13 moreShow less
MoveEnter Open