CVE-2016-5766

Source
https://cve.org/CVERecord?id=CVE-2016-5766
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-5766.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2016-5766
Downstream
Related
Published
2016-08-07T10:59:13.663Z
Modified
2026-07-08T12:52:54.973343Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

Integer overflow in the gd2GetHeader function in gdgd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used in PHP before 5.5.37, 5.6.x before 5.6.23, and 7.x before 7.0.8, allows remote attackers to cause a denial of service (heap-based buffer overflow and application crash) or possibly have unspecified other impact via crafted chunk dimensions in an image.

Database specific
{
    "unresolved_ranges": [
        {
            "cpes": [
                "cpe:2.3:o:fedoraproject:fedora:22:*:*:*:*:*:*:*",
                "cpe:2.3:o:fedoraproject:fedora:23:*:*:*:*:*:*:*",
                "cpe:2.3:o:fedoraproject:fedora:24:*:*:*:*:*:*:*"
            ],
            "vendor_product": "fedoraproject:fedora",
            "extracted_events": [
                {
                    "introduced": "23"
                },
                {
                    "last_affected": "23"
                },
                {
                    "introduced": "24"
                },
                {
                    "last_affected": "24"
                },
                {
                    "introduced": "22"
                },
                {
                    "last_affected": "22"
                }
            ],
            "source": "CPE_STRING"
        },
        {
            "cpes": [
                "cpe:2.3:o:freebsd:freebsd:10.0:*:*:*:*:*:*:*",
                "cpe:2.3:o:freebsd:freebsd:10.1:*:*:*:*:*:*:*",
                "cpe:2.3:o:freebsd:freebsd:10.3:*:*:*:*:*:*:*",
                "cpe:2.3:o:freebsd:freebsd:9.0:*:*:*:*:*:*:*",
                "cpe:2.3:o:freebsd:freebsd:9.1:*:*:*:*:*:*:*",
                "cpe:2.3:o:freebsd:freebsd:9.2:*:*:*:*:*:*:*",
                "cpe:2.3:o:freebsd:freebsd:9.3:*:*:*:*:*:*:*"
            ],
            "vendor_product": "freebsd:freebsd",
            "extracted_events": [
                {
                    "introduced": "10.0"
                },
                {
                    "last_affected": "10.0"
                },
                {
                    "introduced": "10.1"
                },
                {
                    "last_affected": "10.1"
                },
                {
                    "introduced": "9.2"
                },
                {
                    "last_affected": "9.2"
                },
                {
                    "introduced": "9.0"
                },
                {
                    "last_affected": "9.0"
                },
                {
                    "introduced": "9.3"
                },
                {
                    "last_affected": "9.3"
                },
                {
                    "introduced": "10.3"
                },
                {
                    "last_affected": "10.3"
                },
                {
                    "introduced": "9.1"
                },
                {
                    "last_affected": "9.1"
                }
            ],
            "source": "CPE_STRING"
        },
        {
            "cpes": [
                "cpe:2.3:o:redhat:enterprise_linux:5:*:*:*:*:*:*:*",
                "cpe:2.3:o:redhat:enterprise_linux:6.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:enterprise_linux",
            "extracted_events": [
                {
                    "introduced": "6.0"
                },
                {
                    "last_affected": "6.0"
                },
                {
                    "introduced": "5"
                },
                {
                    "last_affected": "5"
                }
            ],
            "source": "CPE_STRING"
        },
        {
            "cpes": [
                "cpe:2.3:o:redhat:openshift:2.0:*:enterprise:*:*:*:*:*"
            ],
            "vendor_product": "redhat:openshift",
            "extracted_events": [
                {
                    "introduced": "2.0"
                },
                {
                    "last_affected": "2.0"
                }
            ],
            "source": "CPE_STRING"
        }
    ]
}
References

Affected packages

Git / github.com/libgd/libgd

Affected ranges

Type
GIT
Repo
https://github.com/libgd/libgd
Events
Database specific
{
    "cpe": "cpe:2.3:a:libgd:libgd:2.2.2:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "2.2.2"
        },
        {
            "last_affected": "2.2.2"
        }
    ],
    "source": "CPE_STRING"
}

Affected versions

2.*
2.2.2
gd-2.*
gd-2.2.2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-5766.json"

Git / github.com/php/php-src

Affected ranges

Type
GIT
Repo
https://github.com/php/php-src
Events
Database specific
{
    "cpe": [
        "cpe:2.3:o:freebsd:freebsd:8.3:*:*:*:*:*:*:*",
        "cpe:2.3:o:freebsd:freebsd:8.0:*:*:*:*:*:*:*",
        "cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*",
        "cpe:2.3:o:freebsd:freebsd:8.4:*:*:*:*:*:*:*",
        "cpe:2.3:o:freebsd:freebsd:8.2:*:*:*:*:*:*:*",
        "cpe:2.3:o:freebsd:freebsd:8.1:*:*:*:*:*:*:*",
        "cpe:2.3:o:freebsd:freebsd:10.2:*:*:*:*:*:*:*",
        "cpe:2.3:o:redhat:enterprise_linux:7.0:*:*:*:*:*:*:*"
    ],
    "extracted_events": [
        {
            "introduced": "8.3"
        },
        {
            "last_affected": "8.3"
        },
        {
            "introduced": "8.0"
        },
        {
            "last_affected": "8.0"
        },
        {
            "introduced": "8.4"
        },
        {
            "last_affected": "8.4"
        },
        {
            "introduced": "8.2"
        },
        {
            "last_affected": "8.2"
        },
        {
            "introduced": "8.1"
        },
        {
            "last_affected": "8.1"
        },
        {
            "introduced": "10.2"
        },
        {
            "last_affected": "10.2"
        },
        {
            "introduced": "7.0"
        },
        {
            "last_affected": "7.0"
        }
    ],
    "source": [
        "CPE_STRING",
        "REFERENCES"
    ]
}

Affected versions

10.*
10.2
7.*
7.0
8.*
8.0
8.1
8.2
8.3
8.4

Database specific

vanir_signatures
[
    {
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "183820387990733455444215637150999073887",
                "18021834238201414578949441055038262345",
                "334593034626459571743002698430345110480",
                "26461974233900450150030247144867305325",
                "311283463863000022992454365625253102445",
                "161485522429828841158027215741124660130",
                "296161358142553532313520047422480048852",
                "222587787824174595950097709248827618808",
                "264774293065332262917206835414693640688"
            ]
        },
        "target": {
            "file": "ext/gd/libgd/gd_gd2.c"
        },
        "id": "CVE-2016-5766-3e6237a7",
        "signature_version": "v1",
        "signature_type": "Line",
        "source": "https://github.com/php/php-src/commit/7722455726bec8c53458a32851d2a87982cf0eac",
        "deprecated": false
    },
    {
        "digest": {
            "function_hash": "339190344963408527699679556574785110748",
            "length": 2569.0
        },
        "target": {
            "function": "_gd2GetHeader",
            "file": "ext/gd/libgd/gd_gd2.c"
        },
        "id": "CVE-2016-5766-a4bb7314",
        "signature_version": "v1",
        "signature_type": "Function",
        "source": "https://github.com/php/php-src/commit/7722455726bec8c53458a32851d2a87982cf0eac",
        "deprecated": false
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-5766.json"
vanir_signatures_modified
"2026-07-08T12:52:54Z"