Critical severity · published Apr 13, 2016
CVE-2016-4009
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…
9.8
CVSS
7.9%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)7.9% · higher than 95% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PI
Pillow · Python
through 3.1.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2016-4009
CVE.org
https://www.cve.org/CVERecord?id=CVE-2016-4009
www.securityfocus.com
http://www.securityfocus.com/bid/86064
Patch
https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst
Patch
https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e
Patch
https://github.com/python-pillow/Pillow/pull/1714
security.gentoo.org
https://security.gentoo.org/glsa/201612-52
More from Pillow
9.8
CVE-2026-96639
Pillow multi-frame loaders can reuse stale native image storage after mode transitions
9.8
CVE-2026-112900
Pillow: Argument Injection in Ghostscript call, potentially leading into RCE
9.8
CVE-2026-112403
Pillow: Heap buffer overflow in ImagingJpegDecode
9.8
CVE-2026-112398
Pillow: Heap buffer overflow in FlashPix (FPX) JPEG decoding leads to code execution
9.8
CVE-2026-112393
Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
