{"id":"CVE-2016-5766","details":"Integer overflow in the _gd2GetHeader function in gd_gd2.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.","modified":"2026-04-10T03:52:30.116067Z","published":"2016-08-07T10:59:13.663Z","related":["MGASA-2016-0242","SUSE-SU-2016:1842-1","SUSE-SU-2016:2013-1","SUSE-SU-2016:2080-1","SUSE-SU-2017:2303-1","SUSE-SU-2017:2317-1","SUSE-SU-2017:2522-1","openSUSE-SU-2024:10062-1"],"references":[{"type":"WEB","url":"http://lists.opensuse.org/opensuse-security-announce/2016-08/msg00025.html"},{"type":"WEB","url":"https://h20566.www2.hpe.com/portal/site/hpsc/public/kb/docDisplay?docId=emr_na-c05240731"},{"type":"WEB","url":"http://lists.opensuse.org/opensuse-updates/2016-08/msg00003.html"},{"type":"WEB","url":"http://lists.opensuse.org/opensuse-security-announce/2016-07/msg00004.html"},{"type":"ADVISORY","url":"https://libgd.github.io/release-2.2.3.html"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/201612-09"},{"type":"ADVISORY","url":"http://php.net/ChangeLog-7.php"},{"type":"ADVISORY","url":"http://rhn.redhat.com/errata/RHSA-2016-2750.html"},{"type":"ADVISORY","url":"http://www.openwall.com/lists/oss-security/2016/06/23/4"},{"type":"ADVISORY","url":"http://www.ubuntu.com/usn/USN-3030-1"},{"type":"ADVISORY","url":"http://rhn.redhat.com/errata/RHSA-2016-2598.html"},{"type":"ADVISORY","url":"http://php.net/ChangeLog-5.php"},{"type":"ADVISORY","url":"http://www.debian.org/security/2016/dsa-3619"},{"type":"FIX","url":"http://github.com/php/php-src/commit/7722455726bec8c53458a32851d2a87982cf0eac?w=1"},{"type":"FIX","url":"https://bugs.php.net/bug.php?id=72339"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/libgd/libgd","events":[{"introduced":"0"},{"last_affected":"ec6b61f591b949a1431280899f21c098ffe8ec14"}],"database_specific":{"versions":[{"introduced":"0"},{"last_affected":"2.2.2"}]}},{"type":"GIT","repo":"https://github.com/php/php-src","events":[{"introduced":"0"},{"last_affected":"6ed96215e586ef9feb27b95327bde094f844db84"},{"introduced":"0"},{"last_affected":"d26068059e83fe40de3430a512471d194119bee0"},{"introduced":"0"},{"last_affected":"5dc92c2117cafc61daaaaa240fd46c3ac33872a4"},{"introduced":"0"},{"last_affected":"5dc92c2117cafc61daaaaa240fd46c3ac33872a4"},{"introduced":"0"},{"last_affected":"b437f2b32eb364c9496d24abcc734272e5c9c980"},{"introduced":"0"},{"last_affected":"70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"},{"introduced":"0"},{"last_affected":"381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"},{"introduced":"0"},{"last_affected":"c70f6c774e77c27873d7786235f1341cde944508"},{"introduced":"0"},{"last_affected":"60fffd296abce5fc071f3c173c25a2696cf683c6"},{"fixed":"7722455726bec8c53458a32851d2a87982cf0eac"}],"database_specific":{"versions":[{"introduced":"0"},{"last_affected":"2.0"},{"introduced":"0"},{"last_affected":"8.3"},{"introduced":"0"},{"last_affected":"8.0"},{"introduced":"0"},{"last_affected":"8.0"},{"introduced":"0"},{"last_affected":"8.4"},{"introduced":"0"},{"last_affected":"8.2"},{"introduced":"0"},{"last_affected":"8.1"},{"introduced":"0"},{"last_affected":"10.2"},{"introduced":"0"},{"last_affected":"7.0"}]}}],"versions":["BEFORE_SAPIFICATION_FEB_10_2000","GD_1_3_0","GD_1_4_0","GD_1_5_0","GD_1_6_0","GD_1_6_1","GD_1_6_2","GD_1_6_3","GD_1_7_0","GD_1_7_1","GD_1_7_2","GD_1_7_3","GD_1_8_0","GD_1_8_1","GD_1_8_3","GD_1_8_4","GD_2_0_0","GD_2_0_1","GD_2_0_10","GD_2_0_11","GD_2_0_12","GD_2_0_13","GD_2_0_14","GD_2_0_15","GD_2_0_17","GD_2_0_18","GD_2_0_19","GD_2_0_2","GD_2_0_20","GD_2_0_21","GD_2_0_22","GD_2_0_23","GD_2_0_24","GD_2_0_25","GD_2_0_26","GD_2_0_27","GD_2_0_28","GD_2_0_29","GD_2_0_3","GD_2_0_30","GD_2_0_31","GD_2_0_32","GD_2_0_33","GD_2_0_34RC1","GD_2_0_4","GD_2_0_5","GD_2_0_6","GD_2_0_7","GD_2_0_8","GD_2_0_9","POST_64BIT_BRANCH_MERGE","POST_AST_MERGE","POST_PHP7_NSAPI_REMOVAL","POST_PHP7_REMOVALS","POST_PHPNG_MERGE","PRE_64BIT_BRANCH_MERGE","PRE_AST_MERGE","PRE_PHP7_EREG_MYSQL_REMOVALS","PRE_PHP7_NSAPI_REMOVAL","PRE_PHP7_REMOVALS","RELEASE_2_0_0","gd-2.1.0","gd-2.1.0-alpha1","gd-2.1.0-rc1","gd-2.1.1","gd-2.2.0","gd-2.2.1","gd-2.2.2","php-7.0.0","php-7.0.0RC1","php-7.0.0RC2","php-7.0.0RC3","php-7.0.0RC4","php-7.0.0RC5","php-7.0.0RC6","php-7.0.0RC7","php-7.0.0RC8","php-7.0.0alpha1","php-7.0.0alpha2","php-7.0.0beta1","php-7.0.0beta2","php-7.0.0beta3","php-8.0.0","php-8.1.0","php-8.2.0","php-8.3.0","php-8.4.0","security-audit-2024"],"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"6.0"}]},{"events":[{"introduced":"0"},{"last_affected":"5"}]},{"events":[{"introduced":"0"},{"last_affected":"10.0"}]},{"events":[{"introduced":"0"},{"last_affected":"23"}]},{"events":[{"introduced":"0"},{"last_affected":"10.1"}]},{"events":[{"introduced":"0"},{"last_affected":"24"}]},{"events":[{"introduced":"0"},{"last_affected":"9.2"}]},{"events":[{"introduced":"0"},{"last_affected":"9.0"}]},{"events":[{"introduced":"0"},{"last_affected":"22"}]},{"events":[{"introduced":"0"},{"last_affected":"9.3"}]},{"events":[{"introduced":"0"},{"last_affected":"10.3"}]},{"events":[{"introduced":"0"},{"last_affected":"9.1"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2016-5766.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}