{"id":"CVE-2022-30595","aliases":["ALPINE-CVE-2022-30595","BIT-pillow-2022-30595","DEBIAN-CVE-2022-30595","EUVD-2022-0201","GHSA-hr8g-f6r6-mr22","MGASA-2023-0164","PYSEC-2022-43145","UBUNTU-CVE-2022-30595","openSUSE-SU-2024:12111-1","openSUSE-SU-2025:14645-1"],"status":"published","title":"Buffer over-flow in Pillow","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.02328,"percentile":0.8366,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-120","CWE-787"],"published":"2022-05-25T11:46:45Z","modified":"2026-11-03T08:04:08Z","fixes":[{"ecosystem":"PyPI","package":"pillow","fixed_in":["9.1.1"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.16","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.21","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.22","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.23","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.24","package":"py3-pillow","fixed_in":["9.1.1-r0"],"sources":["osv"]},{"ecosystem":"Bitnami","package":"pillow","fixed_in":["9.1.1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"pillow","fixed_in":["9.1.1-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"pillow","fixed_in":["9.1.1-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"pillow","fixed_in":["9.1.1-1"],"sources":["osv"]},{"ecosystem":"openSUSE:Tumbleweed","package":"python-Pillow","fixed_in":["9.1.1-1.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.1.0"},{"last_affected":"9.1.0"},{"fixed":"9.1.1"}]}],"versions":["9.1.0"]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.21","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.22","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.23","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.24","package":"py3-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-r0"}]}]},{"source":"osv","ecosystem":"Bitnami","package":"pillow","ranges":[{"type":"SEMVER","events":[{"introduced":"9.1.0"},{"fixed":"9.1.1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-1"}]}]},{"source":"osv","ecosystem":"PyPI","package":"pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.1.0"},{"fixed":"9.1.1"}]}],"versions":["9.1.0"]},{"source":"osv","ecosystem":"Mageia:8","package":"python-pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.2.0-1.mga8"}]}],"bundled":2},{"source":"osv","ecosystem":"PyPI","package":"pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"9.1.0"},{"fixed":"9.1.1"}]}],"versions":["9.1.0"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-Pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"9.1.1-1.1"}]}]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"python-Pillow","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"11.1.0-1.1"}]}],"bundled":3}],"products":[{"vendor":"python","product":"pillow"}],"references":[{"url":"https://github.com/python-pillow/Pillow/blob/main/src/libImaging/TgaRleDecode.c","tags":["x_refsource_MISC","x_transferred","Exploit","Third Party Advisory","advisory","web","report"]},{"url":"https://pillow.readthedocs.io/en/stable/releasenotes/9.1.1.html","tags":["x_refsource_MISC","x_transferred","Release Notes","Third Party Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-30595","tags":["web","advisory"]},{"url":"https://github.com/python-pillow/Pillow/commit/c846cc881ebe34e3518412c2e3636433d9947280","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2022-43145.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-hr8g-f6r6-mr22"},{"url":"https://security.alpinelinux.org/vuln/CVE-2022-30595","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/30xxx/CVE-2022-30595.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-30595","tags":["advisory"]},{"url":"https://github.com/python-pillow/Pillow","tags":["package"]},{"url":"https://advisories.mageia.org/MGASA-2023-0164.html","tags":["advisory"]},{"url":"https://bugs.mageia.org/show_bug.cgi?id=31019","tags":["report"]},{"url":"https://github.com/python-pillow/Pillow/releases/tag/9.1.1","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2022-30595","tags":["report"]},{"url":"https://pillow.readthedocs.io/en/stable/releasenotes/9.1.1.html#security","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-30595","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2022-30595","tags":["web"]},{"url":"https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/44PI4DZ7YJFTM3VMZXVNEBF2OQQVHGKN/","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2022-22817","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2022-24303","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T11:46:45Z","modified":"2024-08-03T06:56:12.974Z","updated_at":"2026-11-02T14:34:30.842561Z"}],"euvd":[{"id":"EUVD-2022-0201","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T11:46:45Z","modified":"2024-08-03T06:56:12Z","updated_at":"2026-11-03T03:25:35.869088Z"}],"ghsa":[{"id":"GHSA-hr8g-f6r6-mr22","title":"Buffer over-flow in Pillow","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.\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.","status":"published","published":"2022-05-26T00:01:27Z","modified":"2024-11-26T18:41:03Z","cvss":[{"version":"4.0","score":8.7,"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","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-120"],"updated_at":"2026-11-02T14:38:23.575854Z"}],"nvd":[{"id":"CVE-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T12:15:08.39Z","modified":"2026-06-17T04:43:54.773Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-787"],"updated_at":"2026-11-02T14:07:21.261605Z"}],"osv":[{"id":"ALPINE-CVE-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T12:15:08.39Z","modified":"2026-11-03T07:30:50.188194709Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T07:50:01.054176Z"},{"id":"DEBIAN-CVE-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T12:15:08.39Z","modified":"2026-11-03T08:04:08.00824808Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-03T08:23:07.763774Z"},{"id":"GHSA-hr8g-f6r6-mr22","title":"Buffer over-flow in Pillow","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.\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.","status":"published","published":"2022-05-26T00:01:27Z","modified":"2024-11-26T18:40:59Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"4.0","score":8.7,"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","level":"high"}],"cwes":["CWE-120"],"updated_at":"2026-11-02T15:46:49.621585Z"},{"id":"PYSEC-2022-43145","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T12:15:00Z","modified":"2024-11-25T22:42:00.503393Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:52:53.449407Z"},{"id":"UBUNTU-CVE-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"withdrawn","published":"2022-05-25T12:15:00Z","modified":"2025-07-16T07:44:31.243586Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:53:53.899276Z"},{"id":"BIT-pillow-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2024-03-06T11:02:11.506Z","modified":"2026-09-08T08:48:18.503798374Z","updated_at":"2026-11-02T15:28:34.724063Z"},{"id":"CVE-2022-30595","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.","status":"published","published":"2022-05-25T11:46:45Z","modified":"2026-10-28T02:30:42.652007613Z","updated_at":"2026-11-02T15:44:25.516981Z"},{"id":"MGASA-2023-0164","title":"Updated python-pillow packages fix security vulnerability","description":"libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in\nthe processing of invalid TGA image files. (CVE-2022-30595)\nImproper Handling of Highly Compressed GIF Data (Data Amplification).\n(CVE-2022-45198)\n","status":"published","published":"2023-05-16T19:17:40Z","modified":"2026-04-16T04:41:29.504737814Z","updated_at":"2026-11-02T15:49:42.263076Z"},{"id":"openSUSE-SU-2024:12111-1","title":"python310-Pillow-9.1.1-1.1 on GA media","description":"These are all security issues fixed in the python310-Pillow-9.1.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T02:54:37.304403Z","updated_at":"2026-11-02T16:58:35.485255Z"},{"id":"openSUSE-SU-2025:14645-1","title":"python311-Pillow-11.1.0-1.1 on GA media","description":"These are all security issues fixed in the python311-Pillow-11.1.0-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2025-01-14T00:00:00Z","modified":"2026-02-04T02:24:58.148358Z","updated_at":"2026-11-02T16:58:36.976155Z"}]}}
