9.8critical
Buffer over-flow in Pillow
- Severity
- 9.8critical CVSS:3.1 by NVD
- Exploit likelihood
- 2.35% (higher than 84% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-hr8g-f6r6-mr22BIT-PILLOW-2022-30595PYSEC-2022-43145
Description
libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| pillow (PyPI) | from 9.1.0 before 9.1.1 | GitHub Advisory Database, PyPA Advisory Database |
| python pillow | 9.1.0 | NVD |
| pillow (Bitnami) | from 9.1.0 before 9.1.1 | Bitnami Vulnerability Database |
All scores
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | 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 |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
| PyPA Advisory Database | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Bitnami Vulnerability Database | critical rating |
Classification
What each source says
CVE List
libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.
GitHub Advisory Database
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.
NVD (es)
El archivo libImaging/TgaRleDecode.c en Pillow versión 9.1.0, presenta un desbordamiento del búfer de la pila en el procesamiento de archivos de imagen TGA no válidos
References
| https://github.com/python-pillow/Pillow/blob/main/src/libImaging/TgaRleDecode.c | advisory, exploit, third-party-advisory, web | |
| https://pillow.readthedocs.io/en/stable/releasenotes/9.1.1.html | advisory, release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2022-30595 | advisory, web | |
| https://github.com/python-pillow/Pillow/commit/c846cc881ebe34e3518412c2e3636433d9947280 | web | |
| https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-43145.yaml | web | |
| https://github.com/python-pillow/Pillow | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-30595 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-hr8g-f6r6-mr22 changed 2024-11-26 | CC-BY-4.0 |
| NVD | CVE-2022-30595 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2022-43145 changed 2024-11-25 | CC-BY-4.0 |
| Bitnami Vulnerability Database | BIT-PILLOW-2022-30595 changed 2026-09-08 | Apache-2.0 |