Python Pillow vulnerabilities

58 known vulnerabilities affecting python/pillow.

Total CVEs
58
CISA KEV
1
actively exploited
Public exploits
0
Exploited in wild
2
Severity breakdown
CRITICAL11HIGH26MEDIUM20LOW1

Vulnerabilities

Page 1 of 3
CVE-2026-40192HIGH≥ 10.3.0, < 12.2.02026-04-13
CVE-2026-40192 [HIGH] CWE-400 FITS GZIP decompression bomb in Pillow 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 Pillo
ghsa
CVE-2026-25990HIGHCVSS 8.9≥ 10.3.0, < 12.1.12026-02-11
CVE-2026-25990 [HIGH] CWE-787 CVE-2026-25990: Pillow is a Python imaging library. From 10.3.0 to before 12.1.1, n out-of-bounds write may be trigg Pillow is a Python imaging library. From 10.3.0 to before 12.1.1, n out-of-bounds write may be triggered when loading a specially crafted PSD image. This vulnerability is fixed in 12.1.1.
ghsanvdosv
CVE-2025-48379MEDIUMCVSS 5.5v11.2.12025-07-01
CVE-2025-48379 [MEDIUM] CWE-122 CVE-2025-48379: Pillow is a Python imaging library. In versions 11.2.0 to before 11.3.0, there is a heap buffer over 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 issu
ghsanvdosv
CVE-2024-28219MEDIUMCVSS 5.9fixed in 10.3.02024-04-03
CVE-2024-28219 [MEDIUM] CWE-680 CVE-2024-28219: In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used instead of In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used instead of strncpy.
ghsanvdosv
CVE-2023-50447HIGHCVSS 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-2023-44271HIGHCVSS 7.5fixed in 10.0.02023-11-03
CVE-2023-44271 [HIGH] CWE-770 CVE-2023-44271: An issue was discovered in Pillow before 10.0.0. It is a Denial of Service that uncontrollably alloc 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.
ghsanvdosv
CVE-2023-5129HIGHCVSS 8.8Exploited≥ 0, < 10.0.12023-10-05
CVE-2023-5129 [HIGH] Duplicate Advisory: Bundled libwebp in Pillow vulnerable Duplicate Advisory: Bundled libwebp in Pillow vulnerable ## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-56pw-mpj4-fxww. This link is maintained to preserve external references. ## Original Description 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 bi
ghsaosv
CVE-2023-4863HIGHKEV≥ 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-2022-45199HIGHCVSS 7.5fixed in 9.3.02022-11-14
CVE-2022-45199 [HIGH] CWE-400 CVE-2022-45199: Pillow before 9.3.0 allows denial of service via SAMPLESPERPIXEL. Pillow before 9.3.0 allows denial of service via SAMPLESPERPIXEL.
ghsanvdosv
CVE-2022-45198HIGHCVSS 7.5fixed in 9.2.02022-11-14
CVE-2022-45198 [HIGH] CVE-2022-45198: Pillow before 9.2.0 performs Improper Handling of Highly Compressed GIF Data (Data Amplification). Pillow before 9.2.0 performs Improper Handling of Highly Compressed GIF Data (Data Amplification).
ghsanvdosv
CVE-2022-30595CRITICALCVSS 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-2022-24303CRITICALCVSS 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-2022-22817CRITICALCVSS 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-2022-22815MEDIUMCVSS 6.5fixed in 9.0.02022-01-10
CVE-2022-22815 [MEDIUM] CWE-665 CVE-2022-22815: path_getbbox in path.c in Pillow before 9.0.0 improperly initializes ImagePath.Path. path_getbbox in path.c in Pillow before 9.0.0 improperly initializes ImagePath.Path.
ghsanvdosv
CVE-2022-22816MEDIUMCVSS 6.5fixed in 9.0.02022-01-10
CVE-2022-22816 [MEDIUM] CWE-125 CVE-2022-22816: path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImageP path_getbbox in path.c in Pillow before 9.0.0 has a buffer over-read during initialization of ImagePath.Path.
ghsanvdosv
CVE-2021-23437HIGHCVSS 7.5≥ 5.2.0, < 8.3.2fixed in unspecified+1 more2021-09-03
CVE-2021-23437 [HIGH] CWE-125 CVE-2021-23437: The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (Re The package pillow 5.2.0 and before 8.3.2 are vulnerable to Regular Expression Denial of Service (ReDoS) via the getrgb function.
cvelistv5ghsanvdosv
CVE-2021-34552CRITICALCVSS 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-2021-25288CRITICALCVSS 9.1fixed in 8.2.02021-06-02
CVE-2021-25288 [CRITICAL] CWE-125 CVE-2021-25288: An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_gray_i.
ghsanvdosv
CVE-2021-25287CRITICALCVSS 9.1fixed in 8.2.02021-06-02
CVE-2021-25287 [CRITICAL] CWE-125 CVE-2021-25287: An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku An issue was discovered in Pillow before 8.2.0. There is an out-of-bounds read in J2kDecode, in j2ku_graya_la.
ghsanvdosv
CVE-2021-28677HIGHCVSS 7.5fixed in 8.2.02021-06-02
CVE-2021-28677 [HIGH] CVE-2021-28677: An issue was discovered in Pillow before 8.2.0. For EPS data, the readline implementation used in EP 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
ghsanvdosv