cbcvebase.

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 1 of 6
CVE-2023-4863P1HIGHKEVPoC≥ 0, < 10.0.12023-09-12
CVE-2023-4863 [HIGH] CWE-787 libwebp: OOB write in BuildHuffmanTable libwebp: OOB write in BuildHuffmanTable Heap buffer overflow in libwebp allow a remote attacker to perform an out of bounds memory write via a crafted HTML page.
ghsaosv
CVE-2026-112393P2CRITICALCVSS 9.8≥ 2.0.0, < 13.0.02026-10-19
CVE-2026-112393 [CRITICAL] CWE-122 CVE-2026-112393: Pillow is a Python imaging library. From 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and s Pillow is a Python imaging library. From 2.0.0 until 13.0.0, Pillow has a heap buffer overflow and stale-heap disclosure in _tiffWriteProc when saving compressed TIFF data through libtiff to a target without a usable fileno(), such as BytesIO. The callback sizes its allocation from the prior buffer size instead of the current write position, all
ghsanvd
CVE-2026-112900P2CRITICAL≥ 2.6.0, < 13.0.02026-10-21
CVE-2026-112900 [CRITICAL] CWE-78 Pillow: Argument Injection in Ghostscript call, potentially leading into RCE Pillow: Argument Injection in Ghostscript call, potentially leading into RCE ### Summary `PIL.EpsImagePlugin.Ghostscript()` builds the Ghostscript command line using the input file path (`fp.name`) **without sanitization**, placing it at `-f `. A filename beginning with `-` is interpreted by Ghostscript as an option, giving command-line argument injection; chainable to RCE (see Impact)
ghsa
CVE-2014-3007P3CRITICALCVSS 10.0v2.3.02014-04-27
CVE-2014-3007 [CRITICAL] CVE-2014-3007: Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute Python Image Library (PIL) 1.1.7 and earlier and Pillow 2.3 might allow remote attackers to execute arbitrary commands via shell metacharacters in unspecified vectors related to CVE-2014-1932, possibly JpegImagePlugin.py.
ghsanvdosv
CVE-2022-22817P3CRITICALCVSS 9.8fixed in 9.0.12022-01-10
CVE-2022-22817 [CRITICAL] CVE-2022-22817: PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones t PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method. A lambda expression could also be used.
ghsanvdosv
CVE-2026-112403P3CRITICAL≥ 0, < 13.0.02026-10-20
CVE-2026-112403 [CRITICAL] CWE-122 Pillow: Heap buffer overflow in ImagingJpegDecode Pillow: Heap buffer overflow in ImagingJpegDecode ## Summary `JpegImageFile.draft()` — which `Image.thumbnail()` calls automatically — requests 1/2, 1/4 or 1/8 scaled JPEG output and shrinks `self._size` and the tile extents to match, so `_setimage()` allocates a single-row decode buffer of `ceil(W/s)` samples. `ImagingJpegDecode()` sets `cinfo.scale_num`/`scale_denom`, calls `jpeg_start_decompress()`, and the
ghsa
CVE-2026-112398P3CRITICAL≥ 0, < 13.0.02026-10-23
CVE-2026-112398 [CRITICAL] CWE-122 Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution ### Credits **Researcher**: Alex Bouffard ([email protected]) ### Summary A heap buffer overflow in Pillow's FlashPix (FPX) JPEG-tile decoder lets an attacker achieve arbitrary code execution by getting an application to open a single crafted file with `Image.open()`. The file is recogniz
ghsa
CVE-2021-34552P3CRITICALCVSS 9.8≥ 1.0, ≤ 1.1.7≥ 1.2, ≤ 8.2.02021-07-13
CVE-2021-34552 [CRITICAL] CWE-120 CVE-2021-34552: Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass co Pillow through 8.2.0 and PIL (aka Python Imaging Library) through 1.1.7 allow an attacker to pass controlled parameters directly into a convert function to trigger a buffer overflow in Convert.c.
ghsanvdosv
CVE-2016-4009P3CRITICALCVSS 9.8≤ 3.1.02016-04-13
CVE-2016-4009 [CRITICAL] CWE-119 CVE-2016-4009: Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote attackers to have unspecified impact via negative values of the new size, which triggers a heap-based buffer overflow.
ghsanvdosv
CVE-2026-54058P3CRITICALCVSS 9.1fixed in 12.3.02026-07-14
CVE-2026-54058 [CRITICAL] CWE-125 CVE-2026-54058: Pillow is a Python imaging library. Prior to 12.3.0, when Pillow loads an uncompressed McIdas AREA i Pillow is a Python imaging library. Prior to 12.3.0, when Pillow loads an uncompressed McIdas AREA image from a filename through the mmap raw codec path, attacker-controlled header words can set a row stride smaller than the natural row width, causing pixel access such as Image.tobytes(), getpixel, convert, or save to read beyond the mapped region
ghsanvd
CVE-2026-96639P3CRITICAL≥ 11.0.0, < 13.0.02026-10-22
CVE-2026-96639 [CRITICAL] CWE-125 Pillow multi-frame loaders can reuse stale native image storage after mode transitions Pillow multi-frame loaders can reuse stale native image storage after mode transitions ### Summary Pillow multi-frame image loaders can retain native `ImagingCore` storage allocated for one frame while changing the Python-side image `mode` and decoder tiles for a later frame. If frame 0 allocates storage for a narrow mode such as `L`, and a later frame of the same dimensions
ghsa
CVE-2020-5311P3CRITICALCVSS 9.8fixed in 6.2.22020-01-03
CVE-2020-5311 [CRITICAL] CWE-120 CVE-2020-5311: libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow. libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow.
ghsanvdosv
CVE-2020-5312P3CRITICALCVSS 9.8fixed in 6.2.22020-01-03
CVE-2020-5312 [CRITICAL] CWE-120 CVE-2020-5312: libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow. libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow.
ghsanvdosv
CVE-2022-30595P3CRITICALCVSS 9.8v9.1.02022-05-25
CVE-2022-30595 [CRITICAL] CWE-787 CVE-2022-30595: libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TG libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files.
ghsanvdosv
CVE-2023-50447P3HIGHCVSS 8.1≤ 10.1.02024-01-19
CVE-2023-50447 [HIGH] CVE-2023-50447: Pillow through 10.1.0 allows PIL.ImageMath.eval Arbitrary Code Execution via the environment paramet Pillow through 10.1.0 allows PIL.ImageMath.eval Arbitrary Code Execution via the environment parameter, a different vulnerability than CVE-2022-22817 (which was about the expression parameter).
ghsanvdosv
CVE-2026-112895P3MEDIUMCVSS 5.5≥ 5.1.0, < 13.0.02026-10-20
CVE-2026-112895 [MEDIUM] CWE-674 Pillow: Unbounded recursion parsing a PDF page tree or trailer chain (incomplete fix for CVE-2026-42310) Pillow: Unbounded recursion parsing a PDF page tree or trailer chain (incomplete fix for CVE-2026-42310) ### Summary When an application appends to an existing PDF with `Image.save(..., format="PDF", append=True)`, Pillow parses that file with `PdfParser`. Two recursive parsers have no effective bound. `linearize_page_tree` follows `/Kids` with no visited set
ghsa
CVE-2022-24303P3CRITICALCVSS 9.1fixed in 9.0.12022-03-28
CVE-2022-24303 [CRITICAL] CVE-2022-24303: Pillow before 9.0.1 allows attackers to delete files because spaces in temporary pathnames are misha Pillow before 9.0.1 allows attackers to delete files because spaces in temporary pathnames are mishandled.
ghsanvdosv
CVE-2026-112894P3HIGH≥ 5.1.0, < 13.0.02026-10-21
CVE-2026-112894 [HIGH] CWE-407 Pillow: Quadratic-time DoS in PDF save_all (PdfParser.next_object_id) Pillow: Quadratic-time DoS in PDF save_all (PdfParser.next_object_id) ``` Quadratic-time DoS in PDF save_all (PdfParser.next_object_id) Location: src/PIL/PdfParser.py:629 in next_object_id() Commit: a707c6b21c313880d0771e54965d142dd42358b6 ``` Pillow's PDF writer takes time proportional to the square of the number of frames when it saves a multi-frame image as a multi-page PDF. Anyone who can g
ghsa
CVE-2026-112397P3HIGH≥ 0, < 13.0.02026-10-20
CVE-2026-112397 [HIGH] CWE-787 Pillow: Out-of-bounds access in _imagingmorph on a zero-width image Pillow: Out-of-bounds access in _imagingmorph on a zero-width image ### Summary A PPM or PGM file can declare a width of 0, which Pillow accepts, producing an image of size `(0, N)`. Passing that image to `ImageMorph.MorphOp.apply()` makes the native morphology code index a row buffer at `outrow[width - 1]`, which is `outrow[-1]` when the width is 0. The process crashes. ### Details The PPM parse
ghsa
CVE-2026-112404P3HIGH≥ 8.1.0, < 13.0.02026-10-20
CVE-2026-112404 [HIGH] CWE-125 Pillow: OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels Pillow: OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels ``` OOB read in TiffDecode.c tile and RGBA paths leaks heap memory into pixels Location: src/libImaging/TiffDecode.c:483 in _decodeTile() Commit: a707c6b21c313880d0771e54965d142dd42358b6 ``` Pillow reads past the end of a heap buffer when decoding certain malformed compressed TIFF files, and copies t
ghsa
Python Pillow vulnerabilities | cvebase