CVE-2016-9190: Pillow - Arbitrary Code Execution via Crafted Image File

pillow Updated 02 Oct 2025

Summary

12/07/2018
Yes i
High
7.8

CVE-2016-9190: Arbitrary code using "crafted image file" approach affecting Pillow. Affects pillow versions < 3.3.2. Fixed in 3.3.2. How to fix ↓

Also tracked for

The same CVE-2016-9190 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pillow is a popular Python imaging library that provides support for opening, manipulating, and saving many different image file formats. It is widely used in various applications for image processing and manipulation tasks. However, versions of Pillow before 3.3.2 are vulnerable to an arbitrary code execution vulnerability.

Vulnerability Detail

The vulnerability in Pillow arises from an insecure sign extension issue affecting the ImagingNew in Storage.c component. This allows context-dependent attackers to execute arbitrary code by utilizing a crafted image file approach. An attacker can exploit this vulnerability by providing a specially crafted image file, which triggers the insecure sign extension issue and leads to the execution of arbitrary code. The ramifications of this vulnerability can be severe, as an attacker can potentially gain unauthorized access, compromise the integrity of the system, or cause denial of service.

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

3.3.2

This is the first release that contains the fix.

pip install --upgrade "pillow==3.3.2"

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

Workaround

There is no known workaround for this vulnerability. It is essential to update Pillow to the patched version as soon as possible to mitigate the risk of exploitation.

Conclusion

In conclusion, the vulnerability in Pillow allows for arbitrary code execution through a crafted image file. It is crucial to update Pillow to version 3.3.2 or later to mitigate the risk of exploitation. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

Pillow is a Python imaging library that provides support for opening, manipulating, and saving various image file formats.

This vulnerability allows attackers to execute arbitrary code by utilizing a crafted image file. The impact can range from unauthorized access to system compromise or denial of service.

To fix this vulnerability, update Pillow to version 3.3.2 or later using the command pip install --upgrade pillow.

No, there is no known workaround for this vulnerability. It is crucial to update Pillow to the patched version.

Related vulnerabilities

Recent vulnerabilities recorded for pillow.

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

3.3.2

This is the first release that contains the fix.

pip install --upgrade "pillow==3.3.2"

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