Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: 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 of the new size, which triggers a heap-based buffer overflow.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2016-4009
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:10 UTC · Revision 1

Source evidence

CVE-2016-4009

core-osv · Original source

Published 13 Apr 2016, 16:59 UTC

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.

osv:CVE-2016-4009
Complete source record
{
  "id": "be5499e4c5648f4be028f4529ab788ff9a6d0e567c211d6d1d82d4d0d0658c32",
  "url": "https://osv.dev/vulnerability/CVE-2016-4009",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2016-4009",
    "summary": "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.",
    "evidence": "osv:CVE-2016-4009",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2016-4009",
      "aliases": [
        "CVE-2016-4009",
        "GHSA-hvr8-466p-75rh",
        "PYSEC-2016-7"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/python-pillow/pillow",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "fff5536b37c2d619c66c1189b6925fa0a8df3822"
                },
                {
                  "fixed": "4e0d9b0b9740d258ade40cce248c93777362ac1e"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:python:pillow:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "3.1.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "4e0d9b0b9740d258ade40cce248c93777362ac1e"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "3.1.0",
            "3.1.0-rc1",
            "2.9.0",
            "2.9.0.dev2",
            "2.9.0.dev1",
            "2.9.0.dev0",
            "2.8.1",
            "2.8.0",
            "2.7.0",
            "2.5.0",
            "2.3.0",
            "2.2.1",
            "2.2.0",
            "2.1.0",
            "2.0.0",
            "1.7.8",
            "1.7.7",
            "1.2",
            "1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-4009.json",
            "vanir_signatures": [
              {
                "id": "CVE-2016-4009-887ea3b7",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "249392201170125350440898696531716901244",
                    "11202227587953824529638588905880424058",
                    "160024393064123553677550538001732590219",
                    "152923593847819400325982600685847468786",
                    "133896275041027215488050480160794937903",
                    "188299484084202681145575477904912448110"
                  ]
                },
                "source": "https://github.com/python-pillow/pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e",
                "target": {
                  "file": "libImaging/Resample.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CVE-2016-4009-e59d23a3",
                "digest": {
                  "length": 4789,
                  "function_hash": "24739840428488294126398128952243479434"
                },
                "source": "https://github.com/python-pillow/pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e",
                "target": {
                  "file": "libImaging/Resample.c",
                  "function": "ImagingResampleHorizontal"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-20T13:14:38Z"
          }
        }
      ],
      "modified": "2026-10-20T13:14:38.946806697Z",
      "provider": "osv",
      "references": [
        "https://security.gentoo.org/glsa/201612-52",
        "https://github.com/python-pillow/Pillow/blob/c3cb690fed5d4bf0c45576759de55d054916c165/CHANGES.rst",
        "https://github.com/python-pillow/Pillow/commit/4e0d9b0b9740d258ade40cce248c93777362ac1e",
        "https://github.com/python-pillow/Pillow/pull/1714"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2016-4009",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 387379,
  "published_at": "2016-04-13T16:59:25.353+00:00"
}