Python Pillow vulnerabilities
115 known vulnerabilities affecting python/pillow.
Total CVEs
115
CISA KEV
1
actively exploited
Public exploits
1
Exploited in wild
2
Severity breakdown
CRITICAL17HIGH64MEDIUM33LOW1
Vulnerabilities
Page 5 of 6
CVE-2022-45199P4HIGHCVSS 7.5fixed in 9.3.02022-11-14
CVE-2022-45199 [HIGH] CWE-400 CVE-2022-45199: Pillow before 9.3.0 allows denial of service via SAMPLESPERPIXEL.
Pillow before 9.3.0 allows denial of service via SAMPLESPERPIXEL.
ghsanvdosv
CVE-2026-96637P3HIGH≥ 0, < 13.0.02026-10-22
CVE-2026-96637 [HIGH] CWE-400 Pillow: Decompression bomb check bypass in SpiderImagePlugin.seek() leads to unbounded allocation DoS
Pillow: Decompression bomb check bypass in SpiderImagePlugin.seek() leads to unbounded allocation DoS
## Summary
SpiderImagePlugin's seek() bypasses the decompression bomb check, allowing a tiny ( DecompressionBombWarning fires correctly.
- BYPASS: Image.open(stack, frame0=1x1) passes; im.seek(1) sets size (100,100) with NO DecompressionBombWarning/Error -> the che
ghsa
CVE-2020-5313P4HIGHCVSS 7.1fixed in 6.2.22020-01-03
CVE-2020-5313 [HIGH] CWE-125 CVE-2020-5313: libImaging/FliDecode.c in Pillow before 6.2.2 has an FLI buffer overflow.
libImaging/FliDecode.c in Pillow before 6.2.2 has an FLI buffer overflow.
ghsanvdosv
CVE-2026-96636P4HIGHCVSS 7.5≥ 0, < 13.0.02026-10-22
CVE-2026-96636 [HIGH] CWE-400 Pillow: Decompression-bomb protection bypass via multi-frame seek() in MPO and DCX (MpoImageFile.seek / DcxImageFile.seek)
Pillow: Decompression-bomb protection bypass via multi-frame seek() in MPO and DCX (MpoImageFile.seek / DcxImageFile.seek)
### Summary
Pillow's decompression-bomb protection (`Image._decompression_bomb_check`, gated by `Image.MAX_IMAGE_PIXELS`) is enforced only on the **first frame**, inside `Image.open()`. For multi-frame formats, `seek()` re-
ghsa
CVE-2026-96642P3HIGH≥ 0, < 13.0.02026-10-22
CVE-2026-96642 [HIGH] CWE-835 Pillow: TarIO negative size field causes infinite CPU-spin loop
Pillow: TarIO negative size field causes infinite CPU-spin loop
### Summary
`TarIO.__init__` does not check that a tar header's size field is positive. A crafted header with a negative size makes it seek backward onto itself. This causes an infinite loop that uses 100% CPU and never returns.
### Details
`TarIO.__init__` reads 512-byte tar headers one at a time, looking for a member with a given name.
ghsa
CVE-2020-35653P4HIGHCVSS 7.1fixed in 8.1.02021-01-12
CVE-2020-35653 [HIGH] CWE-125 CVE-2020-35653: In Pillow before 8.1.0, PcxDecode has a buffer over-read when decoding a crafted PCX file because th
In Pillow before 8.1.0, PcxDecode has a buffer over-read when decoding a crafted PCX file because the user-supplied stride value is trusted for buffer calculations.
ghsanvdosv
CVE-2016-0740P4MEDIUMCVSS 6.5≤ 3.1.02016-04-13
CVE-2016-0740 [MEDIUM] CWE-119 CVE-2016-0740: Buffer overflow in the ImagingLibTiffDecode function in libImaging/TiffDecode.c in Pillow before 3.1
Buffer overflow in the ImagingLibTiffDecode function in libImaging/TiffDecode.c in Pillow before 3.1.1 allows remote attackers to overwrite memory via a crafted TIFF file.
ghsanvdosv
CVE-2026-96641P4MEDIUM≥ 0, < 13.0.02026-10-22
CVE-2026-96641 [MEDIUM] CWE-190 Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise
Pillow: Reachable undefined behavior in native integer operations, potentially leading to denial of service or logic integrity compromise
### Summary
Affected Object and Source
Package: Pillow 12.3.0
Source: PyPI sdist pillow-12.3.0.tar.gz
SHA-256: 3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce
Sink: src/_ima
ghsa
CVE-2022-22816P4MEDIUMCVSS 6.5fixed in 9.0.02022-01-10
CVE-2022-22816 [MEDIUM] CWE-125 CVE-2022-22816: path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImageP
path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImagePath.Path.
ghsanvdosv
CVE-2022-22815P4MEDIUMCVSS 6.5fixed in 9.0.02022-01-10
CVE-2022-22815 [MEDIUM] CWE-665 CVE-2022-22815: path_getbbox in path.c in Pillow before 9.0.0 improperly initializes ImagePath.Path.
path_getbbox in path.c in Pillow before 9.0.0 improperly initializes ImagePath.Path.
ghsanvdosv
CVE-2016-2533P4MEDIUMCVSS 6.5≤ 3.1.02016-04-13
CVE-2016-2533 [MEDIUM] CWE-119 CVE-2016-2533: Buffer overflow in the ImagingPcdDecode function in PcdDecode.c in Pillow before 3.1.1 and Python Im
Buffer overflow in the ImagingPcdDecode function in PcdDecode.c in Pillow before 3.1.1 and Python Imaging Library (PIL) 1.1.7 and earlier allows remote attackers to cause a denial of service (crash) via a crafted PhotoCD file.
ghsanvdosv
CVE-2026-96638P4MEDIUM≥ 9.1.0, < 13.0.02026-10-22
CVE-2026-96638 [MEDIUM] CWE-400 Pillow: BMP RLE decoder memory-amplification DoS via unbounded delta escape / absolute mode
Pillow: BMP RLE decoder memory-amplification DoS via unbounded delta escape / absolute mode
## Summary
BmpRleDecoder can be forced to allocate gigabytes of memory from a kilobyte-sized crafted BMP file via unbounded growth in the delta escape and absolute mode branches.
## Affected versions
All versions up to and including current HEAD (v13.0.0.dev0, commit e7a7ea84)
##
ghsa
CVE-2021-25292P4MEDIUMCVSS 6.5fixed in 8.1.12021-03-19
CVE-2021-25292 [MEDIUM] CWE-1333 CVE-2021-25292: An issue was discovered in Pillow before 8.1.1. The PDF parser allows a regular expression DoS (ReDo
An issue was discovered in Pillow before 8.1.1. The PDF parser allows a regular expression DoS (ReDoS) attack via a crafted PDF file because of a catastrophic backtracking regex.
ghsanvdosv
CVE-2024-28219P4MEDIUMCVSS 5.9fixed in 10.3.02024-04-03
CVE-2024-28219 [MEDIUM] CWE-680 CVE-2024-28219: In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used instead of
In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used instead of strncpy.
ghsanvdosv
CVE-2020-35655P4MEDIUMCVSS 5.4≥ 4.3.0, < 8.1.02021-01-12
CVE-2020-35655 [MEDIUM] CWE-125 CVE-2020-35655: In Pillow before 8.1.0, SGIRleDecode has a 4-byte buffer over-read when decoding crafted SGI RLE ima
In Pillow before 8.1.0, SGIRleDecode has a 4-byte buffer over-read when decoding crafted SGI RLE image files because offsets and length tables are mishandled.
ghsanvdosv
CVE-2016-0775P4MEDIUMCVSS 6.5≤ 3.1.02016-04-13
CVE-2016-0775 [MEDIUM] CWE-119 CVE-2016-0775: Buffer overflow in the ImagingFliDecode function in libImaging/FliDecode.c in Pillow before 3.1.1 al
Buffer overflow in the ImagingFliDecode function in libImaging/FliDecode.c in Pillow before 3.1.1 allows remote attackers to cause a denial of service (crash) via a crafted FLI file.
ghsanvdosv
CVE-2016-3076P4MEDIUMCVSS 5.5v2.5.0v2.5.1+12 more2017-04-24
CVE-2016-3076 [MEDIUM] CWE-119 CVE-2016-3076: Heap-based buffer overflow in the j2k_encode_entry function in Pillow 2.5.0 through 3.1.1 allows rem
Heap-based buffer overflow in the j2k_encode_entry function in Pillow 2.5.0 through 3.1.1 allows remote attackers to cause a denial of service (memory corruption) via a crafted Jpeg2000 file.
ghsanvdosv
CVE-2025-48379P4MEDIUMCVSS 5.5v11.2.12025-07-01
CVE-2025-48379 [MEDIUM] CWE-122 CVE-2025-48379: Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer over
Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer overflow when writing a sufficiently large (>64k encoded with default settings) image in the DDS format due to writing into a buffer without checking for available space. This only affects users who save untrusted data as a compressed DDS image. This issu
ghsanvdosv
CVE-2016-9189P4MEDIUMCVSS 5.5≤ 3.3.12016-11-04
CVE-2016-9189 [MEDIUM] CWE-190 CVE-2016-9189: Pillow before 3.3.2 allows context-dependent attackers to obtain sensitive information by using the
Pillow before 3.3.2 allows context-dependent attackers to obtain sensitive information by using the "crafted image file" approach, related to an "Integer Overflow" issue affecting the Image.core.map_buffer in map.c component.
ghsanvdosv
CVE-2026-55798P4MEDIUMCVSS 4.5fixed in 12.3.02026-07-06
CVE-2026-55798 [MEDIUM] CWE-78 CVE-2026-55798: Pillow is a Python imaging library. Prior to 12.3.0, WindowsViewer.get_command() constructed a cmd.e
Pillow is a Python imaging library. Prior to 12.3.0, WindowsViewer.get_command() constructed a cmd.exe shell command by directly embedding a file path into an f-string without escaping and passed the result to subprocess.Popen(..., shell=True), allowing shell metacharacters in the file path to inject arbitrary cmd.exe commands. This issue is fixed in
ghsanvd