CVE-2014-1932 PIL and Pillow Vulnerable to Symlink Attack on Tmpfiles

Medium 4.4 Published Updated

Local attackers can overwrite arbitrary files and read sensitive data via symlink attacks on temporary files in PIL and Pillow.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2014-1932?

CVE-2014-1932 is a medium-severity path traversal vulnerability in Python Pillow, published on 17 Apr 2014. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-59

Which versions are affected by CVE-2014-1932?

3 open source packages ship an affected version, including pillow. It affects 2 products.

PackageAffectedFixed in
pillow PyPIAll versions2.3.1
pillow PyPIAll versions2.3.1
pillow PyPIAll versions2.3.1

Products include Python Pillow, Pythonware Python Imaging Library.

How do I fix CVE-2014-1932?

Upgrade pillow to 2.3.1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2014-1932 being exploited?

There is no known exploitation of CVE-2014-1932 in the wild and no public exploit code.

All Python Pillow vulnerabilities

Sources

Also known as DEBIAN-CVE-2014-1932, GHSA-x895-2wrm-hvp7, PYSEC-2014-22.

Is CVE-2014-1932 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free