Integer Overflow Vulnerability in Pillow Package: Sensitive Information Exposure

pillow Updated 02 Oct 2025

Summary

04/11/2016
N/A
Yes i
Medium
5.5

CVE-2016-9189: Pillow before 3.3.2 allows context-dependent attackers to obtain sensitive information by using the "crafted image file" approach, related to an "Integer Overflow" issue affecting the Image.core.map_buffer in map.c compo... Affects pillow across 2 version ranges.

< 3.4.2-1 < aab33141f381d5577cdef9033b7fdff79122a10c

Fixed in 3.4.2-1. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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 widely-used Python Imaging Library (PIL) that adds image processing capabilities to your Python interpreter. It supports opening, manipulating, and saving various image file formats. Despite its robust features, Pillow has been found to have vulnerabilities that can be exploited, particularly the Integer Overflow issue that affects the Image.core.map_buffer in the map.c component.

Vulnerability Detail

The vulnerability identified as CVE-2016-9189 allows context-dependent attackers to exploit an Integer Overflow in the Pillow library. This flaw can lead to the exposure of sensitive information when a crafted image file is processed. The issue arises from improper handling of certain image data, which can result in unexpected behavior and potentially allow attackers to read memory contents that should be protected. The severity of this vulnerability is underscored by its CVSS score of 5.5, indicating a moderate risk level.

How To Fix

Minimum fixed version

3.4.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade pillow

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

Workaround

If upgrading is not immediately possible, consider implementing input validation to ensure that only trusted image files are processed. This can help mitigate the risk of exploitation until a proper update can be applied.

Conclusion

The CVE-2016-9189 vulnerability in the Pillow package poses a risk of sensitive information exposure due to an Integer Overflow issue. Users are strongly advised to upgrade to the latest version to mitigate this risk. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for pillow →

Share this vulnerability

FAQ

CVE-2016-9189 is a vulnerability in the Pillow library that allows attackers to exploit an Integer Overflow, leading to potential exposure of sensitive information.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Exploitation of this vulnerability can lead to unauthorized access to sensitive information, which could compromise the security of your application.

Yes, upgrading to Pillow version 3.4.2-1 or later will resolve the vulnerability.

Vulert is a service that monitors and alerts users in real-time for open-source vulnerabilities in software, using just a manifest file like package-lock.json.

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

Minimum fixed version

3.4.2-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade pillow

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