CVE-2016-0775
Medium · 6.5CVSS
6.5
EPSS
2.5%
Published
Apr 13, 2016
CISA due date
—
Cloudanix analysis
A flaw in a widely-used image processing tool allows an attacker to crash an application by uploading a specially crafted image file.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Library
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
A buffer overflow vulnerability exists in the `ImagingFliDecode` function within the Pillow library. When parsing a specially crafted FLI/FLC image file, the function can write data beyond the boundaries of an allocated buffer. This memory corruption leads to a process crash, resulting in a denial of service.
Why it matters to the business
Applications using the vulnerable Pillow library to process images, particularly those that handle user-uploaded content, can be forced to crash by a remote attacker. This can lead to service unavailability and disruption of business operations that rely on image processing workflows, such as user profile updates, content management systems, or data analysis pipelines.
How an attack unfolds
An attacker crafts a malicious FLI or FLC image file containing data that triggers a buffer overflow. The attacker then uploads this file to a web application or service that uses a vulnerable version of the Pillow library for backend image processing (e.g., thumbnail generation, format conversion). When the application attempts to process the malicious file, the `ImagingFliDecode` function overflows a buffer, causing the application process to crash, thereby achieving a denial of service against the service.
How to fix it
Upgrade the Pillow library to version 3.1.1 or later. For systems using `python-pillow/pillow` from GIT, update to a version including commit `893a40850c2d5da41537958e40569c029a6e127b` or later. If an immediate upgrade is not possible, consider implementing input validation to block files with `.fli` or `.flc` extensions from being processed by the library as a temporary mitigation.
How to confirm the fix worked
To validate the fix, check the installed version of the Pillow library in your environment using the appropriate package manager (e.g., `pip show Pillow`). Ensure the version is 3.1.1 or higher. You can also perform a security test by obtaining or creating a proof-of-concept (PoC) FLI file and attempting to process it with the application in a non-production environment. A patched system will handle the file without crashing, likely by raising an error, while a vulnerable system will crash.
Typical attack path
- An attacker creates a malicious FLI or FLC image file designed to cause a buffer overflow.
- The attacker identifies a target application that accepts image uploads and uses a vulnerable version of the Pillow library.
- The attacker submits the malicious image file to the application through a standard file upload feature.
- The backend application receives the file and passes it to the Pillow library for processing.
- The library's vulnerable `ImagingFliDecode` function attempts to decode the file, triggers the overflow, and causes the entire process to crash.
How to detect it
To detect potential exploitation, review application and system logs for unexpected crashes, segmentation faults, or unhandled exceptions in processes responsible for image processing. Correlate these crashes with the processing of files having `.fli` or `.flc` extensions. If core dumps are enabled, analyzing a crash dump may reveal memory corruption originating from the `ImagingFliDecode` function within the Pillow library.
- file.extension:.fli
- file.extension:.flc
- symbol:ImagingFliDecode
What your security team should do
- Immediately upgrade all instances of the Pillow library to version 3.1.1 or newer, prioritizing public-facing applications that process user-submitted images.
- Use software composition analysis (SCA) tools to scan your codebase and dependencies to identify all projects utilizing vulnerable versions of Pillow.
- If patching is delayed, configure application firewalls or file upload logic to reject files with `.fli` and `.flc` extensions to prevent them from reaching the vulnerable code path.
The record
Buffer overflow in the ImagingFliDecode function in libImaging/FliDecode.c in Pillow before 3.1.1 allows remote attackers to cause a denial of service (crash) via a crafted FLI file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| PyPI | pillow | 0 | 3.1.1 |
| Debian:11 | pillow | 0 | 3.1.1-1 |
| Debian:12 | pillow | 0 | 3.1.1-1 |
| Debian:13 | pillow | 0 | 3.1.1-1 |
| Debian:6.0 | python-imaging | 0 | 1.1.7-2+deb6u2 |
| Debian:8 | pillow | 0 | 2.6.1-2+deb8u2 |
| Mageia:5 | python-pillow | 0 | 2.6.2-2.5.mga5 |
| SUSE:Enterprise Storage 1.0 | python-Pillow | 0 | 2.7.0-7.1 |
| SUSE:Enterprise Storage 2 | python-Pillow | 0 | 2.7.0-3.2 |
| SUSE:Enterprise Storage 2.1 | python-Pillow | 0 | 2.7.0-3.1 |
| SUSE:Enterprise Storage 5 | python-Pillow | 0 | 2.8.1-3.9.1 |
| SUSE:OpenStack Cloud 5 | python-Pillow | 0 | 2.7.0-9.1 |
| SUSE:OpenStack Cloud 6 | python-Pillow | 0 | 2.7.0-3.1 |
| SUSE:OpenStack Cloud 7 | ansible | 0 | 2.2.3.0-17.2 |
| SUSE:OpenStack Cloud 7 | crowbar-core | 0 | 4.0+git.1600767499.0615a418f-9.69.3 |
| SUSE:OpenStack Cloud 7 | crowbar-openstack | 0 | 4.0+git.1599037255.25b759234-9.74.4 |
| SUSE:OpenStack Cloud 7 | grafana | 0 | 6.7.4-1.17.1 |
| SUSE:OpenStack Cloud 7 | grafana-natel-discrete-panel | 0 | 0.0.9-1.6.5 |
| SUSE:OpenStack Cloud 7 | openstack-aodh | 0 | 3.0.5~dev2-2.11.2 |
| SUSE:OpenStack Cloud 7 | openstack-aodh-doc | 0 | 3.0.5~dev2-2.11.1 |
| SUSE:OpenStack Cloud 7 | openstack-barbican | 0 | 3.0.1~dev9-2.12.4 |
| SUSE:OpenStack Cloud 7 | openstack-barbican-doc | 0 | 3.0.1~dev9-2.12.2 |
| SUSE:OpenStack Cloud 7 | openstack-cinder | 0 | 9.1.5~dev6-4.28.1 |
| SUSE:OpenStack Cloud 7 | openstack-cinder-doc | 0 | 9.1.5~dev6-4.28.1 |
| SUSE:OpenStack Cloud 7 | openstack-gnocchi | 0 | 3.0.7~dev1-2.8.2 |
| SUSE:OpenStack Cloud 7 | openstack-heat | 0 | 7.0.7~dev10-5.17.3 |
| SUSE:OpenStack Cloud 7 | openstack-heat-doc | 0 | 7.0.7~dev10-5.17.2 |
| SUSE:OpenStack Cloud 7 | openstack-ironic | 0 | 6.2.5~dev3-2.8.2 |
| SUSE:OpenStack Cloud 7 | openstack-ironic-doc | 0 | 6.2.5~dev3-2.8.2 |
| SUSE:OpenStack Cloud 7 | openstack-magnum | 0 | 3.3.2~dev7-14.14.4 |
| SUSE:OpenStack Cloud 7 | openstack-magnum-doc | 0 | 3.3.2~dev7-14.14.2 |
| SUSE:OpenStack Cloud 7 | openstack-manila | 0 | 3.0.1~dev30-4.17.2 |
| SUSE:OpenStack Cloud 7 | openstack-manila-doc | 0 | 3.0.1~dev30-4.17.1 |
| SUSE:OpenStack Cloud 7 | openstack-monasca-agent | 0 | 1.10.1~dev4-13.3 |
| SUSE:OpenStack Cloud 7 | openstack-murano | 0 | 3.0.1~dev21-7.5.3 |
| SUSE:OpenStack Cloud 7 | openstack-murano-doc | 0 | 3.0.1~dev21-7.5.1 |
| SUSE:OpenStack Cloud 7 | openstack-neutron | 0 | 9.4.2~dev21-7.43.2 |
| SUSE:OpenStack Cloud 7 | openstack-neutron-doc | 0 | 9.4.2~dev21-7.43.1 |
| SUSE:OpenStack Cloud 7 | openstack-neutron-vpnaas | 0 | 9.0.1~dev8-5.8.2 |
| SUSE:OpenStack Cloud 7 | openstack-neutron-vpnaas-doc | 0 | 9.0.1~dev8-5.8.2 |
| SUSE:OpenStack Cloud 7 | openstack-nova | 0 | 14.0.11~dev13-4.45.3 |
| SUSE:OpenStack Cloud 7 | openstack-nova-doc | 0 | 14.0.11~dev13-4.45.2 |
| SUSE:OpenStack Cloud 7 | openstack-sahara | 0 | 5.0.2~dev3-14.3 |
| SUSE:OpenStack Cloud 7 | openstack-sahara-doc | 0 | 5.0.2~dev3-14.1 |
| SUSE:OpenStack Cloud 7 | python-Pillow | 0 | 2.8.1-4.17.2 |
| SUSE:OpenStack Cloud 7 | rubygem-crowbar-client | 0 | 3.9.3-7.23.1 |
| Ubuntu:14.04:LTS | pillow | 0 | 2.3.0-1ubuntu3.2 |
| openSUSE:Tumbleweed | python-Pillow | 0 | 3.4.2-1.1 |
| openSUSE:Tumbleweed | python-Pillow | 0 | 3.1.1-4.1 |
| openSUSE:Tumbleweed | python-Pillow | 0 | 8.3.2-1.2 |
| openSUSE:Tumbleweed | python-Pillow | 0 | 10.3.0-1.1 |
Related vulnerabilities
- CVE-2026-25990 Pillow is a Python imaging library. Also affects pillow
- CVE-2025-48379 Pillow is a Python imaging library. Also affects pillow
- CVE-2024-28219 In _imagingcms.c in Pillow before 10.3.0, a buffer overflow exists because strcpy is used… Also affects pillow
- GHSA-4fx9-vc88-q2xc Infinite loop in Pillow Also affects pillow
- GHSA-jgpv-4h4c-xhw3 Uncontrolled Resource Consumption in pillow Also affects pillow
- CVE-2016-3076 Heap-based buffer overflow in the j2k_encode_entry function in Pillow 2.5.0 through 3.1.1… Also affects pillow
- CVE-2016-9190 Pillow before 3.3.2 allows context-dependent attackers to execute arbitrary code by using… Also affects pillow
- CVE-2016-9189 Pillow before 3.3.2 allows context-dependent attackers to obtain sensitive information by… Also affects pillow