CVE-2014-1932: Pillow PIL And Pillow Vulnerable To Vulnerability

HIGH
Advisory Identifier: GHSA-x895-2wrm-hvp7
CVSS 7.7
CWE-59
Published
Advisory Summary

CVE-2014-1932 is a HIGH (CVSS 7.7) pil and pillow vulnerable to vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Pillow libraries in the PyPI ecosystem. The issue involves pil and pillow vulnerable to symlink attack on tmpfiles. Remediation is available by upgrading affected packages to version 2.3.1.

CVE-2014-1932 at a Glance

CVE Identifier CVE-2014-1932
GHSA Identifier GHSA-x895-2wrm-hvp7
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Pillow
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.7

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2014-1932

To remediate this vulnerability, upgrade all affected Pillow dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

pillow fixed: 2.3.1
pip install pillow>=2.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show pillow

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2014-1932, inspect your installed packages using pip:

pip show pillow

Analyze the terminal output to locate any version of Pillow in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.1), your application is affected.

Note: The pip show pillow command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Pillow, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2014-1932 Affected Pillow Versions

1 component(s)
Fixed Versions:
2.3.1
Product / Package Ecosystem Affected Versions Fixed Version
pillow
PyPI
< 2.3.1
2.3.1

References

Frequently Asked Questions

What is CVE-2014-1932?
CVE-2014-1932 is a security vulnerability in Pillow involving PIL and Pillow Vulnerable to Symlink Attack on Tmpfiles under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Pillow versions are affected?
Affected versions include releases prior to 2.3.1 across affected packages: pillow.
What version fixes CVE-2014-1932?
Upgrading to 2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pillow affected?
Yes, pillow is affected in releases prior to 2.3.1. Upgrade your dependency to 2.3.1 or later.
What is the CVSS score of CVE-2014-1932?
CVE-2014-1932 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2014-1932?
CVE-2014-1932 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check PyPI dependencies for CVE-2014-1932?
Run the dependency tree command: 'pip show pillow'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x895-2wrm-hvp7",
  "modified" : "2024-10-09T20:14:02Z",
  "published" : "2022-05-17T02:39:13Z",
  "aliases" : [ "CVE-2014-1932" ],
  "summary" : "PIL and Pillow Vulnerable to Symlink Attack on Tmpfiles",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pillow"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-1932"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-imaging/Pillow/commit/4e9f367dfd3f04c8f5d23f7f759ec12782e10ee7"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737059"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2014-22.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python-pillow/Pillow"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201612-52"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20170103151725/http://www.securityfocus.com/bid/65511"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-updates/2014-05/msg00002.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2014/02/11/1"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2168-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-16T22:52:39Z",
    "nvd_published_at" : "2014-04-17T14:55:00Z"
  }
}