Pillow vulnerabilities
61 known CVE vulnerabilities in Pillow, translated and rated.
- 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.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

