CVE-2019-16865: Pillow - Memory Allocation and Processing Time Vulnerability

pillow Updated 02 Oct 2025

Summary

04/10/2019
Yes i
High
7.5

CVE-2019-16865: An issue was discovered in Pillow before 6.2.0. Affects pillow versions < 6.2.0. Fixed in 6.2.0. How to fix ↓

Also tracked for

The same CVE-2019-16865 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Pillow is a popular Python library for image processing tasks. It provides functionality for opening, manipulating, and saving many different image file formats. The library is widely used in various applications and frameworks for image-related operations. However, versions prior to 6.2.0 are vulnerable to a memory allocation and processing time issue when handling specially crafted invalid image files.

Vulnerability Detail

The vulnerability in Pillow allows an attacker to exploit the library by providing specially crafted invalid image files. When such files are processed, the library may either allocate excessive amounts of memory or take an extremely long time to process the image. This can lead to resource exhaustion, denial of service, or impact the performance of the application using Pillow. The issue originates from improper handling of certain image file structures.

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.2.0

This is the first release that contains the fix.

pip install --upgrade "pillow==6.2.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

In conclusion, the vulnerability in Pillow versions prior to 6.2.0 can be exploited by providing specially crafted invalid image files, leading to memory allocation issues or excessive processing time. To mitigate this vulnerability, it is crucial to upgrade Pillow to version 6.2.0 or later. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

Pillow is a Python library used for image processing tasks, such as opening, manipulating, and saving various image file formats.

Versions of Pillow prior to 6.2.0 are affected by this vulnerability.

This vulnerability can lead to resource exhaustion, denial of service, or impact the performance of applications using Pillow.

To fix this vulnerability, upgrade Pillow to version 6.2.0 or later by running 'pip install --upgrade pillow'.

No specific workaround has been provided for this vulnerability. It is recommended to upgrade to the fixed version.

Related vulnerabilities

Recent vulnerabilities recorded for pillow.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 13.0.0 as of 22 Oct 2026

pip install --upgrade "pillow==13.0.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

6.2.0

This is the first release that contains the fix.

pip install --upgrade "pillow==6.2.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback