CVE-2022-30595
Buffer over-flow in Pillow
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
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 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV: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 High
CVSS: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 High
CVSS: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 Critical
CVSS: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 Critical
CVSS: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 High
CVSS: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 High
CVSS: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 Critical
CVSS: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 Critical
CVSS: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
| Package | Affected | Fixed |
|---|---|---|
pillowPyPI |
9.1.0 to 9.1.0 | 9.1.1 |
py3-pillowAlpine:v3.16 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.17 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.18 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.19 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.20 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.21 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.22 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.23 |
before 9.1.1-r0 | 9.1.1-r0 |
py3-pillowAlpine:v3.24 |
before 9.1.1-r0 | 9.1.1-r0 |
Show 8 moreShow less
| Package | Affected | Fixed |
|---|---|---|
pillowBitnami |
9.1.0 up to 9.1.1 | 9.1.1 |
pillowDebian:12 |
before 9.1.1-1 | 9.1.1-1 |
pillowDebian:13 |
before 9.1.1-1 | 9.1.1-1 |
pillowDebian:14 |
before 9.1.1-1 | 9.1.1-1 |
pillowPyPI |
9.1.0 up to 9.1.1 | 9.1.1 |
python-pillowMageia:8 From an advisory covering 2 CVEs |
before 9.2.0-1.mga8 | 9.2.0-1.mga8 |
python-PillowopenSUSE:Tumbleweed |
before 9.1.1-1.1 | 9.1.1-1.1 |
python-PillowopenSUSE:Tumbleweed From an advisory covering 3 CVEs |
before 11.1.0-1.1 | 11.1.0-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | OSV | |
| affected, aliases, references | OSV | |
| affected | ||
| aliases | EUVD | |
| first indexed | CVE 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
github.com/python-pillow/Pillow/blob/main/src/libImaging/TgaRleDecode.c
pillow.readthedocs.io/en/stable/releasenotes/9.1.1.html
nvd.nist.gov/vuln/detail/CVE-2022-30595
github.com/python-pillow/Pillow/commit/c846cc881ebe34e3518412c2e3636433d9947280
github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-43145.yaml
github.com/advisories/GHSA-hr8g-f6r6-mr22
Show 13 moreShow less
security.alpinelinux.org/vuln/CVE-2022-30595
github.com/CVEProject/cvelistV5/tree/main/cves/2022/30xxx/CVE-2022-30595.json
security-tracker.debian.org/tracker/CVE-2022-30595
github.com/python-pillow/Pillow
advisories.mageia.org/MGASA-2023-0164.html
bugs.mageia.org/show_bug.cgi?id=31019
github.com/python-pillow/Pillow/releases/tag/9.1.1
ubuntu.com/security/CVE-2022-30595
cve.org/CVERecord?id=CVE-2022-30595
suse.com/security/cve/CVE-2022-30595
lists.opensuse.org/archives/list/[email protected]/thread/44PI4DZ7YJFTM3VMZXVNEBF2OQQVHGKN
suse.com/security/cve/CVE-2022-22817
suse.com/security/cve/CVE-2022-24303