{"api_version":"1","generated_at":"2026-07-23T20:47:20+00:00","cve":"CVE-2016-4009","urls":{"html":"https://cve.report/CVE-2016-4009","api":"https://cve.report/api/cve/CVE-2016-4009.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2016-4009","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2016-4009"},"summary":{"title":"CVE-2016-4009","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.","state":"PUBLISHED","assigner":"mitre","published_at":"2016-04-13 16:59:25","updated_at":"2026-05-06 22:30:45"},"problem_types":["CWE-119","n/a"],"metrics":[{"version":"3.0","source":"nvd@nist.gov","type":"Primary","score":"9.8","severity":"CRITICAL","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.0","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"2.0","source":"nvd@nist.gov","type":"Primary","score":"10","severity":"","vector":"AV:N/AC:L/Au:N/C:C/I:C/A:C","data":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","baseScore":10,"accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"COMPLETE","integrityImpact":"COMPLETE","availabilityImpact":"COMPLETE"}}],"references":[{"url":"http://www.securityfocus.com/bid/86064","name":"http://www.securityfocus.com/bid/86064","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"Python Pillow CVE-2016-4009 Integer Overflow Vulnerability","mime":"text/html","httpstatus":"200","archivestatus":"0"},{"url":"https://github.com/python-pillow/Pillow/pull/1714","name":"https://github.com/python-pillow/Pillow/pull/1714","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"],"title":"Overflow in resample.c, with tests by wiredfool · Pull Request #1714 · python-pillow/Pillow · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst","name":"https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch","Vendor Advisory"],"title":"Pillow/CHANGES.rst at c3cb690fed5d4bf0c45576759de55d054916c165 · python-pillow/Pillow · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e","name":"https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"],"title":"fix integer overflow in Resample.c · python-pillow/Pillow@4e0d9b0 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://security.gentoo.org/glsa/201612-52","name":"https://security.gentoo.org/glsa/201612-52","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"Pillow: Multiple vulnerabilities (GLSA 201612-52) — Gentoo security","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2016-4009","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2016-4009","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"n/a","product":"n/a","version":"affected n/a","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2016","cve_id":"4009","vulnerable":"1","versionEndIncluding":"3.1.0","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"python","cpe5":"pillow","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2016-4009","qid":"981033","title":"Python (pip) Security Update for Pillow (GHSA-hvr8-466p-75rh)"}]},"source_records":{"cve_program":{"containers":{"adp":[{"providerMetadata":{"dateUpdated":"2024-08-06T00:17:30.835Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"name":"GLSA-201612-52","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred"],"url":"https://security.gentoo.org/glsa/201612-52"},{"tags":["x_refsource_CONFIRM","x_transferred"],"url":"https://github.com/python-pillow/Pillow/pull/1714"},{"tags":["x_refsource_CONFIRM","x_transferred"],"url":"https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e"},{"name":"86064","tags":["vdb-entry","x_refsource_BID","x_transferred"],"url":"http://www.securityfocus.com/bid/86064"},{"tags":["x_refsource_CONFIRM","x_transferred"],"url":"https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst"}],"title":"CVE Program Container"}],"cna":{"affected":[{"product":"n/a","vendor":"n/a","versions":[{"status":"affected","version":"n/a"}]}],"datePublic":"2016-02-04T00:00:00.000Z","descriptions":[{"lang":"en","value":"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."}],"problemTypes":[{"descriptions":[{"description":"n/a","lang":"en","type":"text"}]}],"providerMetadata":{"dateUpdated":"2017-06-30T16:57:01.000Z","orgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","shortName":"mitre"},"references":[{"name":"GLSA-201612-52","tags":["vendor-advisory","x_refsource_GENTOO"],"url":"https://security.gentoo.org/glsa/201612-52"},{"tags":["x_refsource_CONFIRM"],"url":"https://github.com/python-pillow/Pillow/pull/1714"},{"tags":["x_refsource_CONFIRM"],"url":"https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e"},{"name":"86064","tags":["vdb-entry","x_refsource_BID"],"url":"http://www.securityfocus.com/bid/86064"},{"tags":["x_refsource_CONFIRM"],"url":"https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst"}],"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"cve@mitre.org","ID":"CVE-2016-4009","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"n/a","version":{"version_data":[{"version_value":"n/a"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"n/a"}]}]},"references":{"reference_data":[{"name":"GLSA-201612-52","refsource":"GENTOO","url":"https://security.gentoo.org/glsa/201612-52"},{"name":"https://github.com/python-pillow/Pillow/pull/1714","refsource":"CONFIRM","url":"https://github.com/python-pillow/Pillow/pull/1714"},{"name":"https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e","refsource":"CONFIRM","url":"https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e"},{"name":"86064","refsource":"BID","url":"http://www.securityfocus.com/bid/86064"},{"name":"https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst","refsource":"CONFIRM","url":"https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst"}]}}}},"cveMetadata":{"assignerOrgId":"8254265b-2729-46b6-b9e3-3dfca2d5bfca","assignerShortName":"mitre","cveId":"CVE-2016-4009","datePublished":"2016-04-13T16:00:00.000Z","dateReserved":"2016-04-13T00:00:00.000Z","dateUpdated":"2024-08-06T00:17:30.835Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.1"},"nvd":{"publishedDate":"2016-04-13 16:59:25","lastModifiedDate":"2026-05-06 22:30:45","problem_types":["CWE-119","n/a"],"metrics":{"cvssMetricV30":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"3.0","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":3.9,"impactScore":5.9}],"cvssMetricV2":[{"source":"nvd@nist.gov","type":"Primary","cvssData":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:C/I:C/A:C","baseScore":10,"accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"COMPLETE","integrityImpact":"COMPLETE","availabilityImpact":"COMPLETE"},"baseSeverity":"HIGH","exploitabilityScore":10,"impactScore":10,"acInsufInfo":true,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*","versionEndIncluding":"3.1.0","matchCriteriaId":"2F573E4A-55AB-4868-8CA1-7C7E5EEAC905"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2016","CveId":"4009","Ordinal":"1","Title":"CVE-2016-4009","CVE":"CVE-2016-4009","Year":"2016"},"notes":[{"CveYear":"2016","CveId":"4009","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"CVE-2016-4009"},{"CveYear":"2016","CveId":"4009","Ordinal":"2","NoteData":"2016-04-13","Type":"Other","Title":"Published"},{"CveYear":"2016","CveId":"4009","Ordinal":"3","NoteData":"2017-06-30","Type":"Other","Title":"Modified"}]}}}