CVE-2014-3007: Python Image Library (PIL) and Pillow Remote Command Execution

pillow Updated 02 Oct 2025

Summary

27/04/2014
Yes i
Critical
9.8

CVE-2014-3007: 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... Affects pillow versions < 2.5.0. Fixed in 2.5.0. How to fix ↓

Also tracked for

The same CVE-2014-3007 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Python Image Library (PIL) is a widely used library for image processing in Python. It provides various functions and methods to manipulate and enhance images. Pillow is a fork of PIL that aims to continue its development and provide additional features. Both PIL and Pillow versions 1.1.7 and earlier are affected by a vulnerability that allows remote attackers to execute arbitrary commands. This vulnerability is related to CVE-2014-1932 and is specifically found in the JpegImagePlugin.py module.

Vulnerability Detail

The vulnerability in PIL and Pillow arises due to insufficient input validation, allowing shell metacharacters to be injected into unspecified vectors. This can be exploited by remote attackers to execute arbitrary commands on the target system. The exact vectors and methods of exploitation are not specified in the available information. However, it is crucial to note that this vulnerability can lead to unauthorized command execution, potentially resulting in unauthorized access, data breaches, or system compromise.

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

2.5.0

This is the first release that contains the fix.

pip install --upgrade "pillow==2.5.0"

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

Workaround

No specific workaround is mentioned in the available information. However, as a general best practice, it is advisable to ensure that the PIL or Pillow library is not used in a context where untrusted input can be passed to it. Additionally, it is crucial to keep the software and its dependencies up to date to mitigate the risk of known vulnerabilities.

Conclusion

The vulnerability in PIL and Pillow versions 1.1.7 and earlier allows remote attackers to execute arbitrary commands on the target system. To mitigate this risk, it is crucial to upgrade the affected package to version 2.5.0 or later. Keeping software and dependencies up to date is essential for maintaining a secure environment. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

This vulnerability allows remote attackers to execute arbitrary commands on the target system, potentially leading to unauthorized access, data breaches, or system compromise.

Versions 1.1.7 and earlier of both PIL and Pillow are affected by this vulnerability.

The available information does not mention any specific known exploits for this vulnerability.

The recommended mitigation is to upgrade the affected package to version 2.5.0 or later.

Yes, both PIL and Pillow versions 1.1.7 and earlier are affected, so it is necessary to update both libraries.

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

2.5.0

This is the first release that contains the fix.

pip install --upgrade "pillow==2.5.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