SB2026070342 - Multiple vulnerabilities in Pillow



SB2026070342 - Multiple vulnerabilities in Pillow

Published: July 3, 2026 Updated: July 7, 2026

Security Bulletin ID SB2026070342
CSH Severity
Medium
Patch available
YES
Number of vulnerabilities 11
Exploitation vector Remote access
Highest impact Denial of service

Breakdown by Severity

High 9% Medium 91%
  • Low
  • Medium
  • High
  • Critical

Description

This security bulletin contains information about 11 vulnerabilities.


1) Uncontrolled Memory Allocation (CVE-ID: CVE-2026-55380)

CWE-ID: CWE-789 - Uncontrolled Memory Allocation

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to memory allocation with excessive size value in GdImageFile._open() and the subsequent image loading path when processing a crafted .gd image through PIL.GdImageFile.open(fp) and calling load(). A remote attacker can supply a specially crafted .gd file with oversized dimensions to cause a denial of service.

A 1037-byte header-only file is sufficient to trigger an attempted allocation of approximately 4.3 GB.


2) Uncontrolled Memory Allocation (CVE-ID: CVE-2026-54060)

CWE-ID: CWE-789 - Uncontrolled Memory Allocation

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to memory allocation with excessive size value in FontFile.compile() in PIL/FontFile.py when assembling glyph images from a crafted BDF or PCF font into a combined bitmap. A remote attacker can supply a specially crafted font file to cause a denial of service.

The issue affects the font loading code path used by BdfFontFile and PcfFontFile, where the standard decompression bomb guard is not invoked before the combined bitmap is created.


3) Uncontrolled Memory Allocation (CVE-ID: CVE-2026-54059)

CWE-ID: CWE-789 - Uncontrolled Memory Allocation

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to memory allocation with excessive size value in PcfFontFile._load_bitmaps() when parsing a crafted PCF font file. A remote attacker can supply a crafted PCF font with oversized glyph dimensions to cause a denial of service.

The issue occurs because glyph dimensions from the PCF METRICS section are passed to Image.frombytes() without a decompression bomb check before memory allocation.


4) Uncontrolled Memory Allocation (CVE-ID: CVE-2026-55379)

CWE-ID: CWE-789 - Uncontrolled Memory Allocation

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to memory allocation with excessive size value in the PIL/BdfFontFile.py bdf_char() font loading path when parsing a crafted BDF font file with oversized BBX dimensions and an empty BITMAP section. A remote attacker can supply a specially crafted BDF font file to cause a denial of service.

Loaded glyph images persist in memory for the lifetime of the font object.


5) OS Command Injection (CVE-ID: CVE-2026-55798)

CWE-ID: CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CVSSv4: 1.8 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to execute arbitrary commands.

The vulnerability exists due to command injection in WindowsViewer.get_command() in src/PIL/ImageShow.py when processing a file path in a shell command. A remote attacker can supply a specially crafted file path containing shell metacharacters to execute arbitrary commands.

User interaction is required to open a crafted file path on a Windows system.


6) Heap-based buffer overflow (CVE-ID: CVE-2026-59205)

CWE-ID: CWE-122 - Heap-based Buffer Overflow

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to a heap-based buffer overflow in ImageCmsTransform.apply() when processing a caller-supplied output image whose mode does not match the transform's declared output mode. A remote attacker can supply a crafted output image object to cause a denial of service.

The issue is reachable through Pillow's public ImageCms API, and the source image pixels can influence the bytes written out of bounds.


7) Heap-based buffer overflow (CVE-ID: CVE-2026-59199)

CWE-ID: CWE-122 - Heap-based Buffer Overflow

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to a heap-based buffer overflow in Pillow Image.paste(), Image.crop(), and Image.alpha_composite() when processing attacker-controlled image coordinates near signed 32-bit integer limits. A remote attacker can supply crafted coordinate values to cause a denial of service.

The direct Image.paste() path can copy attacker-controlled source pixel data into the out-of-bounds write, and the issue is reachable through documented public APIs without malformed image files.


8) Out-of-bounds read (CVE-ID: CVE-2026-54058)

CWE-ID: CWE-125 - Out-of-bounds read

CVSSv4: 6.8 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to disclose sensitive information or cause a denial of service.

The vulnerability exists due to an out-of-bounds read in the PyImaging_MapBuffer mmap path used with the McIdas AREA plugin when processing a crafted image file opened from a filename. A remote attacker can supply a specially crafted McIdas AREA image with an undersized row stride to disclose sensitive information or cause a denial of service.

The issue is reachable when Pillow memory-maps an uncompressed raw tile in a mode listed in Image._MAPMODES, and pixel access operations such as Image.tobytes(), getpixel, convert, or save trigger the read.


9) Allocation of Resources Without Limits or Throttling (CVE-ID: CVE-2026-59204)

CWE-ID: CWE-770 - Allocation of Resources Without Limits or Throttling

CVSSv4: 6.7 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to improper memory allocation in the JPEG2000 tiled decoder in src/libImaging/Jpeg2KDecode.c when parsing a crafted tiled JPEG2000 image during decoding. A remote attacker can supply a specially crafted tiled JPEG2000 file to cause a denial of service.

The issue occurs because total_component_width is accumulated across tiles and then used to calculate tile_bytes, which can grow the scratch buffer to roughly the decompressed size of the full image.


10) Infinite loop (CVE-ID: CVE-2026-59203)

CWE-ID: CWE-835 - Loop with Unreachable Exit Condition ('Infinite Loop')

CVSSv4: 6.9 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to improper input validation in the EPS parser in PIL/EpsImagePlugin.py when parsing a crafted EPS %%BeginBinary directive during Image.open(). A remote attacker can supply a specially crafted EPS file with a negative byte count to cause a denial of service.

The issue is triggered during Image.open(), does not require calling Image.load(), and does not require Ghostscript execution.


11) Resource exhaustion (CVE-ID: CVE-2026-59200)

CWE-ID: CWE-400 - Resource exhaustion

CVSSv4: 8.7 [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]


The vulnerability allows a remote attacker to cause a denial of service.

The vulnerability exists due to uncontrolled resource consumption in PdfParser.PdfStream.decode() in Pillow's PdfParser.py when parsing a crafted FlateDecode-compressed PDF stream. A remote attacker can submit a specially crafted PDF file to cause a denial of service.

The issue occurs because zlib.decompress() is called with the PDF stream Length or DL value as an initial buffer hint without limiting the actual decompressed output size.


Remediation

Install update from vendor's website.