// For flags

CVE-2016-5766

gd: Integer overflow in _gd2GetHeader() resulting in heap overflow

Severity Score

8.8
*CVSS v3

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

2
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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.

Desbordamiento de entero en la función _gd2GetHeader en gd_gd2.c en la GD Graphics Library (también conocido como libgd) en versiones anteriores a 2.2.3, como se utiliza en PHP en versiones anteriores a 5.5.37, 5.6.x en versiones anteriores a 5.6.23 y 7.x en versiones anteriores a 7.0.8, permite a atacantes remotos provocar una denegación de servicio (desbordamiento de búfer basado en memoria dinámica y caída de aplicación) o posiblemente tener otro impacto no especificado a través de dimensiones del pedazo en una imagen manipulada.

An integer overflow flaw, leading to a heap-based buffer overflow was found in the imagecreatefromgd2() function of PHP's gd extension. A remote attacker could use this flaw to crash a PHP application or execute arbitrary code with the privileges of the user running that PHP application using gd via a specially crafted GD2 image.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack Vector
Network
Attack Complexity
High
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2016-06-23 CVE Reserved
  • 2016-06-26 CVE Published
  • 2024-03-25 EPSS Updated
  • 2024-08-06 CVE Updated
  • 2024-08-06 First Exploit
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
CWE
  • CWE-122: Heap-based Buffer Overflow
  • CWE-190: Integer Overflow or Wraparound
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
<= 5.5.36
Search vendor "Php" for product "Php" and version " <= 5.5.36"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
alpha1
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
alpha2
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
alpha3
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
alpha4
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
alpha5
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
beta1
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
beta2
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
beta3
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.0
Search vendor "Php" for product "Php" and version "5.6.0"
beta4
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.1
Search vendor "Php" for product "Php" and version "5.6.1"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.2
Search vendor "Php" for product "Php" and version "5.6.2"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.3
Search vendor "Php" for product "Php" and version "5.6.3"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.4
Search vendor "Php" for product "Php" and version "5.6.4"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.5
Search vendor "Php" for product "Php" and version "5.6.5"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.6
Search vendor "Php" for product "Php" and version "5.6.6"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.7
Search vendor "Php" for product "Php" and version "5.6.7"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.8
Search vendor "Php" for product "Php" and version "5.6.8"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.9
Search vendor "Php" for product "Php" and version "5.6.9"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.10
Search vendor "Php" for product "Php" and version "5.6.10"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.11
Search vendor "Php" for product "Php" and version "5.6.11"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.12
Search vendor "Php" for product "Php" and version "5.6.12"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.13
Search vendor "Php" for product "Php" and version "5.6.13"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.14
Search vendor "Php" for product "Php" and version "5.6.14"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.15
Search vendor "Php" for product "Php" and version "5.6.15"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.16
Search vendor "Php" for product "Php" and version "5.6.16"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.17
Search vendor "Php" for product "Php" and version "5.6.17"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.18
Search vendor "Php" for product "Php" and version "5.6.18"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.19
Search vendor "Php" for product "Php" and version "5.6.19"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.20
Search vendor "Php" for product "Php" and version "5.6.20"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.21
Search vendor "Php" for product "Php" and version "5.6.21"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
5.6.22
Search vendor "Php" for product "Php" and version "5.6.22"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.0
Search vendor "Php" for product "Php" and version "7.0.0"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.1
Search vendor "Php" for product "Php" and version "7.0.1"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.2
Search vendor "Php" for product "Php" and version "7.0.2"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.3
Search vendor "Php" for product "Php" and version "7.0.3"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.4
Search vendor "Php" for product "Php" and version "7.0.4"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.5
Search vendor "Php" for product "Php" and version "7.0.5"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.6
Search vendor "Php" for product "Php" and version "7.0.6"
-
Safe
Libgd
Search vendor "Libgd"
Libgd
Search vendor "Libgd" for product "Libgd"
2.2.2
Search vendor "Libgd" for product "Libgd" and version "2.2.2"
-
Affected
in Php
Search vendor "Php"
Php
Search vendor "Php" for product "Php"
7.0.7
Search vendor "Php" for product "Php" and version "7.0.7"
-
Safe
Redhat
Search vendor "Redhat"
Openshift
Search vendor "Redhat" for product "Openshift"
2.0
Search vendor "Redhat" for product "Openshift" and version "2.0"
enterprise
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
8.3
Search vendor "Freebsd" for product "Freebsd" and version "8.3"
-
Affected
Redhat
Search vendor "Redhat"
Enterprise Linux
Search vendor "Redhat" for product "Enterprise Linux"
6.0
Search vendor "Redhat" for product "Enterprise Linux" and version "6.0"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
8.0
Search vendor "Freebsd" for product "Freebsd" and version "8.0"
-
Affected
Redhat
Search vendor "Redhat"
Enterprise Linux
Search vendor "Redhat" for product "Enterprise Linux"
5
Search vendor "Redhat" for product "Enterprise Linux" and version "5"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
10.0
Search vendor "Freebsd" for product "Freebsd" and version "10.0"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
23
Search vendor "Fedoraproject" for product "Fedora" and version "23"
-
Affected
Debian
Search vendor "Debian"
Debian Linux
Search vendor "Debian" for product "Debian Linux"
8.0
Search vendor "Debian" for product "Debian Linux" and version "8.0"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
10.1
Search vendor "Freebsd" for product "Freebsd" and version "10.1"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
24
Search vendor "Fedoraproject" for product "Fedora" and version "24"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
8.4
Search vendor "Freebsd" for product "Freebsd" and version "8.4"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
9.2
Search vendor "Freebsd" for product "Freebsd" and version "9.2"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
8.2
Search vendor "Freebsd" for product "Freebsd" and version "8.2"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
8.1
Search vendor "Freebsd" for product "Freebsd" and version "8.1"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
9.0
Search vendor "Freebsd" for product "Freebsd" and version "9.0"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
10.2
Search vendor "Freebsd" for product "Freebsd" and version "10.2"
-
Affected
Fedoraproject
Search vendor "Fedoraproject"
Fedora
Search vendor "Fedoraproject" for product "Fedora"
22
Search vendor "Fedoraproject" for product "Fedora" and version "22"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
9.3
Search vendor "Freebsd" for product "Freebsd" and version "9.3"
-
Affected
Redhat
Search vendor "Redhat"
Enterprise Linux
Search vendor "Redhat" for product "Enterprise Linux"
7.0
Search vendor "Redhat" for product "Enterprise Linux" and version "7.0"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
10.3
Search vendor "Freebsd" for product "Freebsd" and version "10.3"
-
Affected
Freebsd
Search vendor "Freebsd"
Freebsd
Search vendor "Freebsd" for product "Freebsd"
9.1
Search vendor "Freebsd" for product "Freebsd" and version "9.1"
-
Affected