{"id":"CVE-2022-30595","aliases":["CVE-2022-30595","GHSA-hr8g-f6r6-mr22","BIT-PILLOW-2022-30595","PYSEC-2022-43145"],"related":[],"kind":"vulnerability","state":"published","title":"Buffer over-flow in Pillow","summary":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","source":"cvelist"},{"lang":"en","text":"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.\n\nOpening 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2022-05-25T11:46:45.000Z","modified":"2026-09-08T08:48:18.503Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"CRITICAL"}],"cwes":["CWE-120","CWE-787"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"9.1.0","status":"affected","fixed":"9.1.1"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"ghsa"},{"ranges":[{"status":"affected","version":"9.1.0"}],"vendor":"python","product":"pillow","cpe":"cpe:2.3:a:python:pillow:9.1.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"9.1.0","status":"affected","fixed":"9.1.1"}],"ecosystem":"PyPI","package":"pillow","purl":"pkg:pypi/pillow","source":"pysec"},{"ranges":[{"type":"semver","introduced":"9.1.0","status":"affected","fixed":"9.1.1"}],"ecosystem":"Bitnami","package":"pillow","purl":"pkg:bitnami/pillow","source":"bitnami"}],"references":[{"url":"https://github.com/python-pillow/Pillow/blob/main/src/libImaging/TgaRleDecode.c","tags":["advisory","exploit","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://pillow.readthedocs.io/en/stable/releasenotes/9.1.1.html","tags":["advisory","release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-30595","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/python-pillow/Pillow/commit/c846cc881ebe34e3518412c2e3636433d9947280","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-43145.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-30595","url":"https://www.cve.org/CVERecord?id=CVE-2022-30595","licence":"CVE Terms of Use","modified":"2024-08-03T06:56:12.974Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hr8g-f6r6-mr22","url":"https://github.com/advisories/GHSA-hr8g-f6r6-mr22","licence":"CC-BY-4.0","modified":"2024-11-26T18:40:59.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-30595","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-30595","licence":"Public domain","modified":"2026-06-17T04:43:54.773Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-43145","url":"https://osv.dev/vulnerability/PYSEC-2022-43145","licence":"CC-BY-4.0","modified":"2024-11-25T22:42:00.503Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-PILLOW-2022-30595","url":"https://osv.dev/vulnerability/BIT-PILLOW-2022-30595","licence":"Apache-2.0","modified":"2026-09-08T08:48:18.503Z"}],"updatedAt":"2026-11-25T22:58:11.929Z","epss":{"score":0.02347,"percentile":0.84132,"date":"2026-12-01T12:00:22.000Z"}}