CVE-2016-4009 Pillow Integer overflow in ImagingResampleHorizontal

Critical 9.8 Published Updated

Remote attackers can trigger a heap-based buffer overflow via negative size values, potentially leading to code execution or denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2016-4009?

CVE-2016-4009 is a critical vulnerability in Python Pillow, published on 13 Apr 2016. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Integer overflow in the ImagingResampleHorizontal function in libImaging/Resample.c in Pillow before 3.1.1 allows remote attackers to have unspecified impact via negative values of the new size, which triggers a heap-based buffer overflow.

Weakness: CWE-119

Which versions are affected by CVE-2016-4009?

3 open source packages ship an affected version, including pillow. It affects 1 product.

PackageAffectedFixed in
pillow PyPIAll versions3.1.1
pillow PyPIAll versions3.1.1
pillow PyPIAll versions3.1.1

Products include Python Pillow.

How do I fix CVE-2016-4009?

Upgrade pillow to 3.1.1 or later.

Is CVE-2016-4009 being exploited?

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

All Python Pillow vulnerabilities

Sources

Also known as DEBIAN-CVE-2016-4009, GHSA-hvr8-466p-75rh, PYSEC-2016-7.

Is CVE-2016-4009 in your software?

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

Check your SBOMs for free