Pillow vulnerabilities
20 known CVE vulnerabilities in Pillow, translated and rated.
- CVE-2026-54058Critical
A vulnerability in Pillow before version 12.3.0 allows an attacker to read process memory or cause a fault when loading an uncompressed McIdas AREA image via the mmap codec path. Attacker-controlled header words can set a row stride smaller than the natural row width, leading to out-of-bounds read beyond the mapped region.
- CVE-2016-4009Critical
Integer overflow in the ImagingResampleHorizontal function in Pillow before version 3.1.1 allows remote attackers to have unspecified impact via negative values of the new size, leading to a heap-based buffer overflow.
- CVE-2026-59200High
In the Pillow Python imaging library, versions 5.1.0 through 12.3.0, the PdfParser.PdfStream.decode() function calls zlib.decompress() with a buffer size set to the PDF stream Length field without bounding the decompressed output size. This allows a crafted FlateDecode PDF stream to exhaust memory from a small file.
- CVE-2026-59197High
The Pillow library (Python Imaging Library) before version 12.3.0 contains a heap out-of-bounds write vulnerability in the public rank-filter API. Providing a very large odd filter size causes overflow in image dimension calculations.
- CVE-2026-59205High
A vulnerability in the Pillow Python imaging library allows controlled native heap corruption via the ImageCms.ImageCmsTransform.apply(im, imOut) API when the output image mode does not match the declared transform output mode. This issue is fixed in version 12.3.0.
- CVE-2026-59204High
Vulnerability in Pillow (versions 8.2.0 through 12.2.0) causes excessive memory usage when decoding a crafted tiled JPEG2000 file, potentially leading to denial of service (OOM).
- CVE-2026-59203Medium
Pillow library versions 12.0.0 through 12.2.0 have a vulnerability in the EPS parser (PIL/EpsImagePlugin.py) that allows an infinite loop via a crafted EPS file with a negative byte count in the %%BeginBinary directive. An attacker can exploit this to cause a denial of service (DoS) when opening a malicious file with Image.open().
- CVE-2026-59199High
A vulnerability in the Pillow Python imaging library allows a native heap out-of-bounds write when processing image coordinates near signed 32-bit integer limits in Image.paste(), Image.crop(), and Image.alpha_composite(). The issue is fixed in version 12.3.0.
- CVE-2026-59198Medium
In Pillow library versions 5.2.0 through 12.3.0, a vulnerability exists in the TGA RLE encoder. When saving a mode 1 image with RLE compression, the encoder reads past its packed row buffer, causing adjacent process heap bytes to be copied into the generated TGA file. The issue is fixed in version 12.3.0.
- CVE-2026-55798Medium
In Pillow prior to version 12.3.0, the WindowsViewer.get_command() function 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.
- CVE-2026-55380High
In Pillow before version 12.3.0, the GdImageFile._open() method in GdImageFile.py read image dimensions from the GD 2.x header without calling Image._decompression_bomb_check(), allowing a crafted .gd file to trigger excessive C-heap allocation when loaded.
- CVE-2026-55379High
In Pillow before version 12.3.0, the bdf_char() function in BdfFontFile.py reads the BBX width and height from a BDF font file and passes attacker-controlled dimensions to Image.new() without calling Image._decompression_bomb_check(), bypassing decompression bomb protection and allowing excessive memory allocation.
- CVE-2026-54060High
In Pillow before version 12.3.0, FontFile.compile() does not call Image._decompression_bomb_check(), allowing a font to trigger excessive memory allocation during conversion or saving.
- CVE-2026-54059High
In Pillow before version 12.3.0, the _load_bitmaps() function in PcfFontFile.py reads glyph dimensions from the PCF METRICS section and passes them directly to Image.frombytes() without calling Image._decompression_bomb_check(), allowing crafted PCF font data to cause excessive memory allocation.
- CVE-2026-42311High
Pillow is a Python imaging library. From version 10.3.0 to before version 12.2.0, processing a malicious PSD file could lead to memory corruption, potentially resulting in a crash or arbitrary code execution. This issue has been patched in version 12.2.0.
- CVE-2026-42310Medium
Pillow (Python imaging library) from version 4.2.0 to before version 12.2.0 contains a vulnerability where an attacker can supply a malicious PDF that causes the process to hang indefinitely, consuming 100% CPU and making the application unresponsive.
- CVE-2026-42309Medium
Pillow (Python imaging library) from version 11.2.1 to before version 12.2.0 contains a heap buffer overflow vulnerability when passing nested lists as coordinates to APIs such as ImagePath.Path, ImageDraw.ImageDraw.polygon and ImageDraw.ImageDraw.line. Nested lists were recursively unpacked beyond the allocated buffer. Coordinate lists are now validated to contain exactly two numeric coordinates.
- CVE-2026-42308Medium
Pillow is a Python imaging library. Prior to version 12.2.0, if a font advances each glyph by an excessively large amount, an integer overflow may occur when tracking the current position.
- CVE-2026-40192High
Pillow versions 10.3.0 through 12.1.1 did not limit the amount of GZIP-compressed data read when decoding a FITS image, making them vulnerable to decompression bomb attacks. A specially crafted FITS file could cause unbounded memory consumption, leading to denial of service (OOM crash or severe performance degradation).
- CVE-2026-25990High
In the Pillow Python imaging library, versions 10.3.0 through 12.1.0 are vulnerable to an out-of-bounds write when loading a specially crafted PSD image. This issue is fixed in version 12.1.1.

