GHSA-hr8g-f6r6-mr22
Buffer over-flow in Pillow
At a glance
- Published
- Updated
- CVE
- CVE-2022-30595
- Aliases
- BIT-pillow-2022-30595, PYSEC-2022-43145
- CVSS_V3
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CVSS_V4
- 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
Description
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.
Affected packages
| Package | Versions |
|---|---|
| PyPI · pillow | introduced 9.1.0, fixed 9.1.1 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-30595 ADVISORY
- 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
- https://github.com/python-pillow/Pillow/blob/main/src/libImaging/TgaRleDecode.c WEB
- https://pillow.readthedocs.io/en/stable/releasenotes/9.1.1.html WEB
Sources
| Source | Licence |
|---|---|
| OSV.dev | CC-BY 4.0 — GitHub Advisory Database |