pillow known bugs
pypi114 known bugs in pillow, with affected versions, fixes and workarounds. Sourced from upstream issue trackers.
114
bugs
Known bugs
| Severity | Affected | Fixed in | Title | Status | Source |
|---|---|---|---|---|---|
| high | 11.2.0 | 11.3.0 | Pillow vulnerability can cause write buffer overflow on BCn encoding 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.
* Unclear how large the potential write could be. It is likely limited by process segfault, so it's not necessarily deterministic. It may be practically unbounded.
* Unclear if there's a restriction on the bytes that could be emitted. It's likely that the only restriction is that the bytes would be emitted in chunks of 8 or 16.
This was introduced in Pillow 11.2.0 when the feature was added. | fixed | osv:GHSA-xg8h-j46f-w952 |
| high | any | 2.3.1 | PIL and Pillow Vulnerable to Symlink Attack on Tmpfiles The (1) `load_djpeg` function in `JpegImagePlugin.py`, (2) `Ghostscript` function in `EpsImagePlugin.py`, (3) `load` function in `IptcImagePlugin.py`, and (4) `_copy` function in `Image.py` in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 do not properly create temporary files, which allow local users to overwrite arbitrary files and obtain sensitive information via a symlink attack on the temporary file. | fixed | osv:GHSA-x895-2wrm-hvp7 |
| high | 10.3.0 | 12.2.0 | FITS GZIP decompression bomb in Pillow ### Impact
Pillow did not limit the amount of GZIP-compressed data read when decoding a FITS image, making it 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).
### Patches
The amount of data read is now limited to the necessary amount.
Fixed in Pillow 12.2.0 (PR #9521).
### Workarounds
Avoid Pillow >= 10.3.0, < 12.2.0
Only open [specific image formats](https://pillow.readthedocs.io/en/stable/releasenotes/8.0.0.html#image-open-add-formats-parameter), excluding FITS. | fixed | osv:GHSA-whj4-6x5x-4v2j |
| high | any | 3.3.2 | Arbitrary code using "crafted image file" approach affecting Pillow Pillow before 3.3.2 allows context-dependent attackers to execute arbitrary code by using the "crafted image file" approach, related to an "Insecure Sign Extension" issue affecting the ImagingNew in Storage.c component. | fixed | osv:GHSA-w4vg-rf63-f3j3 |
| high | any | 8.1.0 | Pillow Out-of-bounds Write In Pillow before 8.1.0, TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. | fixed | osv:GHSA-vqcj-wrf2-7v73 |
| high | any | 7.1.0 | Out-of-bounds reads in Pillow In `libImaging/Jpeg2KDecode.c` in Pillow before 7.1.0, there are multiple out-of-bounds reads via a crafted JP2 file. | fixed | osv:GHSA-vj42-xq3r-hr3r |
| high | 2.5.0 | 3.1.2 | Pillow Buffer overflow in Jpeg2KEncode.c 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. | fixed | osv:GHSA-v9pc-9mvp-x87g |
| high | 2.4.0 | 8.2.0 | Pillow Out-of-bounds Read vulnerability An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_gray_i. This dates to Pillow 2.4.0. | fixed | osv:GHSA-rwv7-3v45-hg29 |
| high | any | 8.2.0 | Uncontrolled Resource Consumption in Pillow An issue was discovered in Pillow before 8.2.0. For EPS data, the readline implementation used in EPSImageFile has to deal with any combination of \r and \n as line endings. It used an accidentally quadratic method of accumulating lines while looking for a line ending. A malicious EPS file could use this to perform a DoS of Pillow in the open phase, before an image was accepted for opening. | fixed | osv:GHSA-q5hq-fp76-qmrc |
| high | 9.2.0 | 9.3.0 | Pillow subject to DoS via SAMPLESPERPIXEL tag Pillow starting with 9.2.0 and prior to 9.3.0 allows denial of service via SAMPLESPERPIXEL. A large value in the SAMPLESPERPIXEL tag could lead to a memory and runtime DOS in TiffImagePlugin.py when setting up the context for image decoding. This issue has been patched in version 9.3.0. | fixed | osv:GHSA-q4mp-jvh2-76fj |
| high | 4.3.0 | 8.1.1 | Out of bounds read in Pillow An issue was discovered in Pillow before 8.1.1. There is an out-of-bounds read in SGIRleDecode.c. | fixed | osv:GHSA-p43w-g3c5-g5mq |
| high | any | 8.2.0 | Out of bounds read in Pillow An issue was discovered in Pillow before 8.2.0. In `TiffDecode.c`, there is an out-of-bounds read in `TiffreadRGBATile` via invalid tile boundaries. | fixed | osv:GHSA-mvg9-xffr-p774 |
| high | any | 9.2.0 | Pillow vulnerable to Data Amplification attack. Pillow before 9.2.0 performs Improper Handling of Highly Compressed GIF Data (Data Amplification). | fixed | osv:GHSA-m2vv-5vj5-2hm7 |
| high | any | 6.2.0 | DOS attack in Pillow when processing specially crafted image files An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image. | fixed | osv:GHSA-j7mj-748x-7p78 |
| high | any | 0.1.8 | 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. | fixed | osv:GHSA-j7hp-h8jx-5ppr |
| high | any | 2.5.3 | Pillow is vulnerable to Denial of Service (DOS) in the Jpeg2KImagePlugin The Jpeg2KImagePlugin plugin in Pillow before 2.5.3 allows remote attackers to cause a denial of service via a crafted image. | fixed | osv:GHSA-j6f7-g425-4gmx |
| high | 9.1.0 | 9.1.1 | Buffer over-flow in Pillow When reading a TGA file with RLE packets that cross scan lines, Pillow reads the information past the end of the first line without deducting that from the length of the remaining file data. This vulnerability was introduced in Pillow 9.1.0, and can cause a heap buffer overflow.
Opening an image with a zero or negative height has been found to bypass a decompression bomb check. This will now raise a SyntaxError instead, in turn raising a PIL.UnidentifiedImageError. | fixed | osv:GHSA-hr8g-f6r6-mr22 |
| high | any | 6.2.2 | Out-of-bounds Read in Pillow `libImaging/FliDecode.c` in Pillow before 6.2.2 has an FLI buffer overflow. | fixed | osv:GHSA-hj69-c76v-86wr |
| high | any | 2.7.0 | Pillow denial of service via PNG bomb Pillow before 2.7.0 allows remote attackers to cause a denial of service via a compressed text chunk in a PNG image that has a large size when it is decompressed. | fixed | osv:GHSA-h5rf-vgqx-wjv2 |
| high | any | 8.2.0 | Pillow denial of service An issue was discovered in Pillow before 8.2.0. `PSDImagePlugin.PsdImageFile` lacked a sanity check on the number of input layers relative to the size of the data block. This could lead to a DoS on `Image.open` prior to `Image.load`. | fixed | osv:GHSA-g6rj-rv7j-xwp4 |
| high | any | 8.1.0 | Pillow Out-of-bounds Read 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. | fixed | osv:GHSA-f5g8-5qq7-938w |
| high | any | 8.1.2 | Pillow Denial of Service by Uncontrolled Resource Consumption Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for a BLP container, and thus an attempted memory allocation can be very large. | fixed | osv:GHSA-f4w8-cv6p-x6r5 |
| high | any | 7.1.0 | Out-of-bounds reads in Pillow Pillow before 7.1.0 has multiple out-of-bounds reads in `libImaging/FliDecode.c`. | fixed | osv:GHSA-cqhg-xjhh-p8hf |
| high | any | 2.3.2 | Pillow denial of service via Crafted Block Size `PIL/IcnsImagePlugin.py` in Python Imaging Library (PIL) and Pillow before 2.3.2 and 2.5.x before 2.5.2 allows remote attackers to cause a denial of service via a crafted block size. | fixed | osv:GHSA-cfmr-38g9-f2h7 |
| high | 10.3.0 | 12.1.1 | Pillow affected by out-of-bounds write when loading PSD images ### Impact
An out-of-bounds write may be triggered when loading a specially crafted PSD image. Pillow >= 10.3.0 users are affected.
### Patches
Pillow 12.1.1 will be released shortly with a fix for this.
### Workarounds
`Image.open()` has a `formats` parameter that can be used to prevent PSD images from being opened.
### References
Pillow 12.1.1 will add release notes at https://pillow.readthedocs.io/en/stable/releasenotes/index.html | fixed | osv:GHSA-cfh3-3jmp-rvhc |
| high | any | 9.0.1 | Path traversal in Pillow Pillow before 9.0.1 allows attackers to delete files because spaces in temporary pathnames are mishandled. | fixed | osv:GHSA-9j59-75qj-795w |
| high | 5.2.0 | 8.3.2 | Uncontrolled Resource Consumption in pillow The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb function. | fixed | osv:GHSA-98vv-pw6r-q6q4 |
| high | any | 8.1.2 | Pillow Denial of Service by Uncontrolled Resource Consumption Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICO container, and thus an attempted memory allocation can be very large. | fixed | osv:GHSA-95q3-8gr9-gm8w |
| high | any | 3.1.1 | Pillow Buffer overflow in ImagingFliDecode 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. | fixed | osv:GHSA-8xjv-v9xq-m5h9 |
| high | any | 8.1.1 | Out-of-bounds Write in Pillow An issue was discovered in Pillow before 8.1.1. In TiffDecode.c, there is a negative-offset memcpy with an invalid size. | fixed | osv:GHSA-8xjq-8fcg-g5hw |
| high | any | 10.0.0 | Pillow Denial of Service vulnerability An issue was discovered in Pillow before 10.0.0. It is a Denial of Service that uncontrollably allocates memory to process a given task, potentially causing a service to crash by having it run out of memory. This occurs for truetype in ImageFont when textlength in an ImageDraw instance operates on a long text argument. | fixed | osv:GHSA-8ghj-p4vj-mr35 |
| high | any | 7.1.0 | Buffer overflow in Pillow In Pillow before 7.1.0, there are two Buffer Overflows in `libImaging/TiffDecode.c`. | fixed | osv:GHSA-8843-m7mw-mxqm |
| high | any | 8.2.0 | Potential infinite loop in Pillow An issue was discovered in Pillow before 8.2.0. For FLI data, FliDecode did not properly check that the block advance was non-zero, potentially leading to an infinite loop on load. | fixed | osv:GHSA-7r7m-5h27-29hp |
| high | 2.4.0 | 8.2.0 | Out-of-bounds Read in Pillow An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_graya_la. | fixed | osv:GHSA-77gc-v2xv-rvvh |
| high | any | 6.2.2 | Uncontrolled Resource Consumption in Pillow There is a DoS vulnerability in Pillow before 6.2.2 caused by FpxImagePlugin.py calling the range function on an unvalidated 32-bit integer if the number of bands is large. On Windows running 32-bit Python, this results in an OverflowError or MemoryError due to the 2 GB limit. However, on Linux running 64-bit Python this results in the process being terminated by the OOM killer. | fixed | osv:GHSA-5gm3-px64-rw72 |
| high | any | 10.3.0 | Pillow buffer overflow vulnerability In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used instead of strncpy. | fixed | osv:GHSA-44wm-f244-xhp3 |
| high | any | 7.1.0 | Out-of-bounds read in Pillow In `libImaging/PcxDecode.c` in Pillow before 7.1.0, an out-of-bounds read can occur when reading PCX files where `state->shuffle` is instructed to read beyond `state->buffer`. | fixed | osv:GHSA-3xv8-3j54-hgrp |
| high | any | 8.1.2 | Pillow Uncontrolled Resource Consumption Pillow before 8.1.2 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICNS container, and thus an attempted memory allocation can be very large. | fixed | osv:GHSA-3wvg-mj6g-m9cv |
| high | any | 3.1.1 | Pillow buffer overflow in ImagingPcdDecode 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. | fixed | osv:GHSA-3c5c-7235-994j |
| medium | any | ef98b3510e3e4f14b547762764813d7e5ca3c5a4 | PYSEC-2025-61: advisory 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 issue has been patched in version 11.3.0. | fixed | osv:PYSEC-2025-61 |
| medium | any | 1fe1bb49c452b0318cad12ea9d97c3bef188e9a7 | PYSEC-2023-227: advisory An issue was discovered in Pillow before 10.0.0. It is a Denial of Service that uncontrollably allocates memory to process a given task, potentially causing a service to crash by having it run out of memory. This occurs for truetype in ImageFont when textlength in an ImageDraw instance operates on a long text argument. | fixed | osv:PYSEC-2023-227 |
| medium | any | 10.0.1 | PYSEC-2023-175: advisory Pillow versions before v10.0.1 bundled libwebp binaries in wheels that are vulnerable to CVE-2023-5129 (previously CVE-2023-4863). Pillow v10.0.1 upgrades the bundled libwebp binary to v1.3.2. | fixed | osv:PYSEC-2023-175 |
| medium | any | 9.0.0 | PYSEC-2022-9: advisory path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImagePath.Path. | fixed | osv:PYSEC-2022-9 |
| medium | any | 9.0.0 | PYSEC-2022-8: advisory path_getbbox in path.c in Pillow before 9.0.0 improperly initializes ImagePath.Path. | fixed | osv:PYSEC-2022-8 |
| medium | 9.1.0 | 9.1.1 | PYSEC-2022-43145: advisory libImaging/TgaRleDecode.c in Pillow 9.1.0 has a heap buffer overflow in the processing of invalid TGA image files. | fixed | osv:PYSEC-2022-43145 |
| medium | any | 2444cddab2f83f28687c7c20871574acbb6dbcf3 | PYSEC-2022-42980: advisory Pillow before 9.3.0 allows denial of service via SAMPLESPERPIXEL. | fixed | osv:PYSEC-2022-42980 |
| medium | any | 11918eac0628ec8ac0812670d9838361ead2d6a4 | PYSEC-2022-42979: advisory Pillow before 9.2.0 performs Improper Handling of Highly Compressed GIF Data (Data Amplification). | fixed | osv:PYSEC-2022-42979 |
| medium | any | 9.0.1 | PYSEC-2022-168: advisory Pillow before 9.0.1 allows attackers to delete files because spaces in temporary pathnames are mishandled. | fixed | osv:PYSEC-2022-168 |
| medium | any | 9.0.0 | PYSEC-2022-10: advisory PIL.ImageMath.eval in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method. | fixed | osv:PYSEC-2022-10 |
| medium | any | 8.2.0 | PYSEC-2021-94: advisory An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data. | fixed | osv:PYSEC-2021-94 |
| medium | any | 8.2.0 | PYSEC-2021-93: advisory An issue was discovered in Pillow before 8.2.0. For EPS data, the readline implementation used in EPSImageFile has to deal with any combination of \r and \n as line endings. It used an accidentally quadratic method of accumulating lines while looking for a line ending. A malicious EPS file could use this to perform a DoS of Pillow in the open phase, before an image was accepted for opening. | fixed | osv:PYSEC-2021-93 |
| medium | any | 8.2.0 | PYSEC-2021-92: advisory An issue was discovered in Pillow before 8.2.0. For FLI data, FliDecode did not properly check that the block advance was non-zero, potentially leading to an infinite loop on load. | fixed | osv:PYSEC-2021-92 |
| medium | 4.3.0 | 8.1.0 | PYSEC-2021-71: advisory 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. | fixed | osv:PYSEC-2021-71 |
| medium | any | 8.1.0 | PYSEC-2021-70: advisory In Pillow before 8.1.0, TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. | fixed | osv:PYSEC-2021-70 |
| medium | any | 8.1.0 | PYSEC-2021-69: advisory 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. | fixed | osv:PYSEC-2021-69 |
| medium | any | 8.1.1 | PYSEC-2021-42: advisory Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICO container, and thus an attempted memory allocation can be very large. | fixed | osv:PYSEC-2021-42 |
| medium | any | 8.1.1 | PYSEC-2021-41: advisory Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for an ICNS container, and thus an attempted memory allocation can be very large. | fixed | osv:PYSEC-2021-41 |
| medium | any | 8.1.1 | PYSEC-2021-40: advisory Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for a BLP container, and thus an attempted memory allocation can be very large. | fixed | osv:PYSEC-2021-40 |
| medium | any | 8.1.1 | PYSEC-2021-39: advisory An issue was discovered in Pillow before 8.1.1. There is an out-of-bounds read in SGIRleDecode.c. | fixed | osv:PYSEC-2021-39 |
| medium | any | 8.1.1 | PYSEC-2021-38: advisory 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. | fixed | osv:PYSEC-2021-38 |
| medium | any | 8.1.1 | PYSEC-2021-37: advisory An issue was discovered in Pillow before 8.1.1. In TiffDecode.c, there is an out-of-bounds read in TiffreadRGBATile via invalid tile boundaries. | fixed | osv:PYSEC-2021-37 |
| medium | any | 8.1.1 | PYSEC-2021-36: advisory An issue was discovered in Pillow before 8.1.1. In TiffDecode.c, there is a negative-offset memcpy with an invalid size. | fixed | osv:PYSEC-2021-36 |
| medium | any | 8.1.1 | PYSEC-2021-35: advisory An issue was discovered in Pillow before 8.1.1. TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. NOTE: this issue exists because of an incomplete fix for CVE-2020-35654. | fixed | osv:PYSEC-2021-35 |
| medium | any | 8.3.0 | PYSEC-2021-331: advisory 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. | fixed | osv:PYSEC-2021-331 |
| medium | any | 9e08eb8f78fdfd2f476e1b20b7cf38683754866b | PYSEC-2021-317: advisory The package pillow from 0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb function. | fixed | osv:PYSEC-2021-317 |
| medium | any | 8.2.0 | PYSEC-2021-139: advisory An issue was discovered in Pillow before 8.2.0. PSDImagePlugin.PsdImageFile lacked a sanity check on the number of input layers relative to the size of the data block. This could lead to a DoS on Image.open prior to Image.load. | fixed | osv:PYSEC-2021-139 |
| medium | any | 8.2.0 | PYSEC-2021-138: advisory An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_gray_i. | fixed | osv:PYSEC-2021-138 |
| medium | any | 8.2.0 | PYSEC-2021-137: advisory An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_graya_la. | fixed | osv:PYSEC-2021-137 |
| medium | any | a09acd0decd8a87ccce939d5ff65dab59e7d365b | PYSEC-2020-84: advisory libImaging/FliDecode.c in Pillow before 6.2.2 has an FLI buffer overflow. | fixed | osv:PYSEC-2020-84 |
| medium | any | 93b22b846e0269ee9594ff71a72bec02d2bea8fd | PYSEC-2020-83: advisory libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow. | fixed | osv:PYSEC-2020-83 |
| medium | any | a79b65c47c7dc6fe623aadf09aa6192fc54548f3 | PYSEC-2020-82: advisory libImaging/SgiRleDecode.c in Pillow before 6.2.2 has an SGI buffer overflow. | fixed | osv:PYSEC-2020-82 |
| medium | any | 4e2def2539ec13e53a82e06c4b3daf00454100c4 | PYSEC-2020-81: advisory libImaging/TiffDecode.c in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc. | fixed | osv:PYSEC-2020-81 |
| medium | any | 7.1.0 | PYSEC-2020-80: advisory In libImaging/SgiRleDecode.c in Pillow through 7.0.0, a number of out-of-bounds reads exist in the parsing of SGI image files, a different issue than CVE-2020-5311. | fixed | osv:PYSEC-2020-80 |
| medium | any | 7.0.0 | PYSEC-2020-79: advisory In libImaging/Jpeg2KDecode.c in Pillow before 7.1.0, there are multiple out-of-bounds reads via a crafted JP2 file. | fixed | osv:PYSEC-2020-79 |
| medium | any | 46f4a349b88915787fea3fb91348bb1665831bbb | PYSEC-2020-78: advisory In Pillow before 7.1.0, there are two Buffer Overflows in libImaging/TiffDecode.c. | fixed | osv:PYSEC-2020-78 |
| medium | any | 6a83e4324738bb0452fbe8074a995b1c73f08de7 | PYSEC-2020-77: advisory In libImaging/PcxDecode.c in Pillow before 7.1.0, an out-of-bounds read can occur when reading PCX files where state->shuffle is instructed to read beyond state->buffer. | fixed | osv:PYSEC-2020-77 |
| medium | any | 7.1.0 | PYSEC-2020-76: advisory Pillow before 7.1.0 has multiple out-of-bounds reads in libImaging/FliDecode.c. | fixed | osv:PYSEC-2020-76 |
| medium | any | 6.2.2 | PYSEC-2020-172: advisory There is a DoS vulnerability in Pillow before 6.2.2 caused by FpxImagePlugin.py calling the range function on an unvalidated 32-bit integer if the number of bands is large. On Windows running 32-bit Python, this results in an OverflowError or MemoryError due to the 2 GB limit. However, on Linux running 64-bit Python this results in the process being terminated by the OOM killer. | fixed | osv:PYSEC-2020-172 |
| medium | any | 6.2.0 | PYSEC-2019-110: advisory An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image. | fixed | osv:PYSEC-2019-110 |
| medium | 2.5.0 | 3.1.2 | PYSEC-2017-92: advisory 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. | fixed | osv:PYSEC-2017-92 |
| medium | any | 3.3.2 | PYSEC-2016-9: advisory Pillow before 3.3.2 allows context-dependent attackers to execute arbitrary code by using the "crafted image file" approach, related to an "Insecure Sign Extension" issue affecting the ImagingNew in Storage.c component. | fixed | osv:PYSEC-2016-9 |
| medium | any | 3.3.2 | PYSEC-2016-8: advisory 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. | fixed | osv:PYSEC-2016-8 |
| medium | any | 4e0d9b0b9740d258ade40cce248c93777362ac1e | PYSEC-2016-7: advisory 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. | fixed | osv:PYSEC-2016-7 |
| medium | any | 893a40850c2d5da41537958e40569c029a6e127b | PYSEC-2016-6: advisory 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. | fixed | osv:PYSEC-2016-6 |
| medium | any | 6dcbf5bd96b717c58d7b642949da8d323099928e | PYSEC-2016-5: advisory 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. | fixed | osv:PYSEC-2016-5 |
| medium | any | ae453aa18b66af54e7ff716f4ccb33adca60afd4 | PYSEC-2016-19: advisory 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. | fixed | osv:PYSEC-2016-19 |
| medium | any | 2.7.0 | PYSEC-2015-16: advisory Pillow before 2.7.0 allows remote attackers to cause a denial of service via a compressed text chunk in a PNG image that has a large size when it is decompressed. | fixed | osv:PYSEC-2015-16 |
| medium | any | 2.5.3 | PYSEC-2015-15: advisory The Jpeg2KImagePlugin plugin in Pillow before 2.5.3 allows remote attackers to cause a denial of service via a crafted image. | fixed | osv:PYSEC-2015-15 |
| medium | any | 2.5.0 | PYSEC-2014-87: advisory 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. | fixed | osv:PYSEC-2014-87 |
| medium | any | 4e9f367dfd3f04c8f5d23f7f759ec12782e10ee7 | PYSEC-2014-23: advisory The (1) JpegImagePlugin.py and (2) EpsImagePlugin.py scripts in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 uses the names of temporary files on the command line, which makes it easier for local users to conduct symlink attacks by listing the processes. | fixed | osv:PYSEC-2014-23 |
| medium | any | 4e9f367dfd3f04c8f5d23f7f759ec12782e10ee7 | PYSEC-2014-22: advisory The (1) load_djpeg function in JpegImagePlugin.py, (2) Ghostscript function in EpsImagePlugin.py, (3) load function in IptcImagePlugin.py, and (4) _copy function in Image.py in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 do not properly create temporary files, which allow local users to overwrite arbitrary files and obtain sensitive information via a symlink attack on the temporary file. | fixed | osv:PYSEC-2014-22 |
| medium | any | 205e056f8f9b06ed7b925cf8aa0874bc4aaf8a7d | PYSEC-2014-10: advisory PIL/IcnsImagePlugin.py in Python Imaging Library (PIL) and Pillow before 2.3.2 and 2.5.x before 2.5.2 allows remote attackers to cause a denial of service via a crafted block size. | fixed | osv:PYSEC-2014-10 |
| medium | c58d2817bc891c26e6b8098b8909c0eb2e7ce61b | 9887544fafcd13cc8afcfa0c6d0f2e6facc1a8b8 | Segv on unknown address in jpeg_read_scanlines OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50217
https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html#decode-jpeg-compressed-blp1-data-in-original-mode
```
Crash type: Segv on unknown address
Crash state:
jpeg_read_scanlines
ImagingJpegDecode
_decode
```
| fixed | osv:OSV-2022-715 |
| medium | bb2016794f1f9bf9e4726727080e1beb789823fb | f7363c1091c70356d92e56abfca6b65bef9e7b26 | Invalid-free in _dealloc OSS-Fuzz report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52587
```
Crash type: Invalid-free
Crash state:
_dealloc
_Py_DECREF
frame_dealloc
```
| fixed | osv:OSV-2022-1074 |
| medium | any | 9.0.0 | Out-of-bounds Read in Pillow path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImagePath.Path. | fixed | osv:GHSA-xrcv-f9gm-v42c |
| medium | any | 3.3.2 | Pillow Integer overflow in Map.c 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. | fixed | osv:GHSA-rwr3-c2q8-gm56 |
| medium | any | 2.3.1 | Pillow Temporary file name leakage The (1) JpegImagePlugin.py and (2) EpsImagePlugin.py scripts in Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.3.1 uses the names of temporary files on the command line, which makes it easier for local users to conduct symlink attacks by listing the processes. | fixed | osv:GHSA-r854-96gq-rfg3 |
| medium | any | 9.0.0 | Improper Initialization in Pillow Pillow is the friendly PIL (Python Imaging Library) fork. `path_getbbox` in `path.c` in Pillow before 9.0.0 improperly initializes `ImagePath.Path`. | fixed | osv:GHSA-pw3c-h7wp-cvhx |
| medium | any | 8.1.2 | Uncontrolled Resource Consumption in pillow ### Impact
_Pillow before 8.1.1 allows attackers to cause a denial of service (memory consumption) because the reported size of a contained image is not properly checked for a BLP container, and thus an attempted memory allocation can be very large._
### Patches
_An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image._
### Workarounds
_An issue was discovered in Pillow before 6.2.0. When reading specially crafted invalid image files, the library can either allocate very large amounts of memory or take an extremely long period of time to process the image._
### References
https://nvd.nist.gov/vuln/detail/CVE-2021-27921
### For more information
If you have any questions or comments about this advisory:
* Open an issue in [example link to repo](http://example.com)
* Email us at [example email address](mailto:[email protected]) | fixed | osv:GHSA-jgpv-4h4c-xhw3 |
| medium | 5.1.0 | 8.2.0 | Insufficient Verification of Data Authenticity in Pillow An issue was discovered in Pillow before 8.2.0. For BLP data, BlpImagePlugin did not properly check that reads (after jumping to file offsets) returned data. This could lead to a DoS where the decoder could be run a large number of times on empty data. | fixed | osv:GHSA-hjfx-8p6c-g7gx |
| medium | any | 3.1.1 | Pillow Buffer overflow in ImagingLibTiffDecode 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. | fixed | osv:GHSA-hggx-3h72-49ww |
| medium | 4.3.0 | 8.1.0 | Pillow Out-of-bounds Read 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. | fixed | osv:GHSA-hf64-x4gq-p99h |
| medium | 5.1.0 | 8.1.1 | Regular Expression Denial of Service (ReDoS) in Pillow 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. | fixed | osv:GHSA-9hx2-hgq2-2g4f |
| low | any | 9.0.0 | Infinite loop in Pillow JpegImagePlugin may append an EOF marker to the end of a truncated file, so that the last segment of the data will still be processed by the decoder.
If the EOF marker is not detected as such however, this could lead to an infinite loop where JpegImagePlugin keeps trying to end the file. | fixed | osv:GHSA-4fx9-vc88-q2xc |
| critical | any | 6.2.2 | Integer overflow in Pillow `libImaging/TiffDecode.c` in Pillow before 6.2.2 has a TIFF decoding integer overflow, related to realloc. | fixed | osv:GHSA-vcqg-3p29-xw73 |
| critical | any | 6.2.2 | Buffer Copy without Checking Size of Input in Pillow `libImaging/SgiRleDecode.c` in Pillow before 6.2.2 has an SGI buffer overflow. | fixed | osv:GHSA-r7rm-8j6h-r933 |
| critical | any | 6.2.2 | PCX P mode buffer overflow in Pillow libImaging/PcxDecode.c in Pillow before 6.2.2 has a PCX P mode buffer overflow. | fixed | osv:GHSA-p49h-hjvm-jg3h |
| critical | any | 3.1.1 | Pillow Integer overflow in ImagingResampleHorizontal 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. | fixed | osv:GHSA-hvr8-466p-75rh |
| critical | any | 9.0.1 | Arbitrary expression injection in Pillow `PIL.ImageMath.eval` in Pillow before 9.0.0 allows evaluation of arbitrary expressions, such as ones that use the Python exec method `ImageMath.eval("exec(exit())")`.
While Pillow 9.0.0 restricted top-level builtins available to PIL.ImageMath.eval(), it did not prevent builtins available to lambda expressions. These are now also restricted in 9.0.1. | fixed | osv:GHSA-8vj2-vxx3-667w |
| critical | any | 2.5.0 | Pillow command injection Python Image Library (PIL) 1.1.7 and earlier and Pillow before 2.5.0 might allow remote attackers to execute arbitrary commands via shell metacharacters in unspecified vectors related to CVE-2014-1932, possibly JpegImagePlugin.py. | fixed | osv:GHSA-8m9x-pxwq-j236 |
| critical | any | 8.3.0 | Buffer Overflow in Pillow 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. | fixed | osv:GHSA-7534-mm45-c74v |
| critical | any | 8.1.1 | Out of bounds write in Pillow An issue was discovered in Pillow before 8.1.1. TiffDecode has a heap-based buffer overflow when decoding crafted YCbCr files because of certain interpretation conflicts with LibTIFF in RGBA mode. NOTE: this issue exists because of an incomplete fix for CVE-2020-35654. | fixed | osv:GHSA-57h3-9rgr-c24m |
| critical | any | 7.1.0 | Out-of-bounds read in Pillow In libImaging/SgiRleDecode.c in Pillow through 7.0.0, a number of out-of-bounds reads exist in the parsing of SGI image files, a different issue than CVE-2020-5311. | fixed | osv:GHSA-43fq-w8qq-v88h |
| critical | any | 10.2.0 | Arbitrary Code Execution in Pillow 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). | fixed | osv:GHSA-3f63-hfp8-52jq |
API access
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/bugs/pypi/pillow