CVE-2016-8670
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library ...
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
CVE-2016-8670- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-119
- Updated
- 2026-11-02
CVE List No score
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
CVE-2016-8670- Updated
- 2026-11-02
EUVDEUVD-2016-9509 No score
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
EUVD-2016-9509- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-7hrm-234x-37p5
9.8
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library ...
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
GHSA-7hrm-234x-37p5- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-119
- Updated
- 2026-11-02
OSVBELL-CVE-2016-8670
9.8
CVE-2016-8670 does not affect BellSoft software
- Record
BELL-CVE-2016-8670- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSV
9.8
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
CVE-2016-8670- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Show 11 moreShow less
OSVDEBIAN-CVE-2016-8670
9.8
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
DEBIAN-CVE-2016-8670- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2016-8670
9.8
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
- Record
UBUNTU-CVE-2016-8670- CVSS 3.0
- 9.8 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2020-1605798462 No score
Fix of 227 CVE
- Fix bug #69720: Null pointer dereference in phar_get_fp_offset()
- Fix bug #70728: Type Confusion Vulnerability in PHP_to_XMLRPC_worker()
- Fix bug #70661: Use After Free Vulnerability in WDDX Packet Deserialization
- Fix bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
- Fix bug #71459: Integer overflow in iptcembed()
- Fix bug #71039: exec functions ignore length but look for NULL termination
- Fix bug #71354: Heap corruption in tar/zip/phar parser.
- Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata()
- Fix bug #71323: Output of stream_get_meta_data can be falsified by its input
- Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile()
- Fix bug #71587: Use-After-Free / Double-Free in WDDX Deserialize
- Fix bug #71860: Invalid memory write in phar on filename with \0 in name
- Fix bug #71798: Integer Overflow in php_raw_url_encode
- Fix bug #72837: integer overflow in bzdecompress caused heap corruption
- Fix bug #72681: PHP Session Data Injection Vulnerability
- Fix bug #72807: integer overflow in curl_escape caused heap corruption
- Fix bug #72838: Integer overflow lead to heap corruption in sql_regcase
- Fix bug #72697: select_colors write out-of-bounds
- Fix bug #72730: imagegammacorrect allows arbitrary write access
- Fix bug #72836: integer overflow in base64_decode caused heap corruption
- Fix bug #72848: integer overflow in quoted_printable_encode caused heap corruption
- Fix bug #72849: integer overflow in urlencode caused heap corruption
- Fix bug #72850: integer overflow in php_uuencode caused heap corruption
- Fix bug #72771: ftps:// wrapper is vulnerable to protocol downgrade attack
- Fix bug #72749: wddx_deserialize allows illegal memory access
- Fix bug #72750: wddx_deserialize null dereference
- Fix bug #72790: wddx_deserialize null dereference with invalid xml
- Fix bug #72799: wddx_deserialize null dereference in php_wddx_pop_element
- Fix bug #73189: Memcpy negative size parameter php_resolve_path
- Fix bug #73150: missing NULL check in dom_document_save_html
- Fix bug #73284: heap overflow in php_ereg_replace function
- Fix bug #73218: stack-buffer-overflow through "ResourceBundle" methods
- Fix bug #73208: integer overflow in imap_8bit caused heap corruption
- Fix bug #73082: string length overflow in mb_encode_* function
- Fix bug #73174: heap overflow in php_pcre_replace_impl
- Fix bug #73276: crash in openssl_random_pseudo_bytes function
- Fix bug #73275: crash in openssl_encrypt function
- Fix bug #73017: memory corruption in wordwrap function
- Fix bug #73240: Write out of bounds at number_format
- Fix bug #73073: CachingIterator null dereference when convert to string
- Fix bug #73293: NULL pointer dereference in SimpleXMLElement::asXML()
- Fix bug #73356: crash in bzcompress function
- Fix bug #72696: imagefilltoborder stackoverflow on truecolor images
- Fix bug #73418: Integer Overflow in "_php_imap_mail" leads Heap Overflow
- Fix bug #73144: Use-after-free in ArrayObject Deserialization
- Fix bug #73192: parse_url return wrong hostname
- Fix bug #73331: NULL Pointer Dereference in WDDX Packet Deserialization with PDORow
- Fix bug #73452: Segfault (Regression for #69152)
- Fix bug #73631: Invalid read when wddx decodes empty boolean element
- Fix bug #67587: Redirection loop on nginx with FPM
- Fix bug #71465: PHAR doesn't know about litespeed
- Fix bug #73737: FPE when parsing a tag format
- Fix bug #73868: Fix DOS vulnerability in gdImageCreateFromGd2Ctx()
- Fix bug #73869: Signed Integer Overflow gd_io.c
- Fix bug #73773: Seg fault when loading hostile phar
- Fix bug #70436: Use After Free Vulnerability in unserialize()
- Fix bug #74603: PHP INI Parsing Stack Buffer Overflow Vulnerability
- Fix bug #72535: arcfour encryption stream filter crashes php
- Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unseria
- Fix bug #72455: Heap Overflow due to integer overflows
- Fix bug #74782:…
- Record
CLSA-2020-1605798462- Updated
- 2026-11-02
OSVMGASA-2016-0421 No score
Updated libgd packages fixe security vulnerabilities
Ibrahim El-Sayed discovered that the GD library incorrectly handled certain malformed Tiff images. If a user or automated system were tricked into processing a specially crafted Tiff image, an attacker could cause a denial of service (CVE-2016-6911).
Emmanuel Law discovered that the GD library incorrectly handled certain strings when creating images. If a user or automated system were tricked into processing a specially crafted image, an attacker could cause a denial of service, or possibly execute arbitrary code (CVE-2016-8670).
- Record
MGASA-2016-0421- Updated
- 2026-11-02
OSVSUSE-SU-2016:2668-1 No score
Security update for gd
This update for gd fixes the following security issues:
- CVE-2016-7568: A specially crafted image file could cause an application crash or potentially execute arbitrary code when the image is converted to webp (bsc#1001900)
- CVE-2016-8670: Stack Buffer Overflow in GD dynamicGetbuf (bsc#1004924)
- CVE-2016-6911: Check for out-of-bound read in dynamicGetbuf() (bsc#1005274)
- Record
SUSE-SU-2016:2668-1- Updated
- 2026-11-02
OSVSUSE-SU-2016:2670-1 No score
Security update for gd
This update for gd fixes the following issues:
- CVE-2016-8670: Stack Buffer Overflow in GD dynamicGetbuf (bsc#1004924)
- CVE-2016-6911: Check for out-of-bound read in dynamicGetbuf() (bsc#1005274)
- Record
SUSE-SU-2016:2670-1- Updated
- 2026-11-02
OSVSUSE-SU-2016:2681-1 No score
Security update for php53
This update for php53 fixes the following issues:
- CVE-2016-8670: Stack Buffer Overflow in GD dynamicGetbuf (bsc#1004924)
- CVE-2016-6911: Check for out-of-bound read in dynamicGetbuf() (bsc#1005274)
- Record
SUSE-SU-2016:2681-1- Updated
- 2026-11-02
OSVSUSE-SU-2016:2683-1 No score
Security update for php7
This update for php7 fixes the following security issue:
- CVE-2016-7568: A specially crafted image file could cause an application crash or potentially execute arbitrary code when the image is converted to webp (bsc#1001900)
- CVE-2016-8670: Stack Buffer Overflow in GD dynamicGetbuf (bsc#1004924)
- CVE-2016-6911: Check for out-of-bound read in dynamicGetbuf() (bsc#1005274)
- Record
SUSE-SU-2016:2683-1- Updated
- 2026-11-02
OSVSUSE-SU-2016:2683-2 No score
Security update for php7
This update for php7 fixes the following security issue:
- CVE-2016-7568: A specially crafted image file could cause an application crash or potentially execute arbitrary code when the image is converted to webp (bsc#1001900)
- CVE-2016-8670: Stack Buffer Overflow in GD dynamicGetbuf (bsc#1004924)
- CVE-2016-6911: Check for out-of-bound read in dynamicGetbuf() (bsc#1005274)
- Record
SUSE-SU-2016:2683-2- Updated
- 2026-11-02
OSVSUSE-SU-2016:2766-1 No score
Security update for php5
This update for php5 fixes the following security issues:
- CVE-2016-7568: A specially crafted image file could cause an application crash or potentially execute arbitrary code when the image is converted to webp (bsc#1001900)
- CVE-2016-8670: Stack Buffer Overflow in GD dynamicGetbuf (bsc#1004924)
- CVE-2016-6911: Check for out-of-bound read in dynamicGetbuf() (bsc#1005274)
- Record
SUSE-SU-2016:2766-1- Updated
- 2026-11-02
OSVUSN-3117-1 No score
libgd2 vulnerabilities
Ibrahim El-Sayed discovered that the GD library incorrectly handled certain malformed Tiff images. If a user or automated system were tricked into processing a specially crafted Tiff image, an attacker could cause a denial of service. (CVE-2016-6911)
Ke Liu discovered that the GD library incorrectly handled certain integers when processing WebP images. If a user or automated system were tricked into processing a specially crafted WebP image, an attacker could cause a denial of service, or possibly execute arbitrary code. This issue only applied to Ubuntu 14.04 LTS, Ubuntu 16.04 LTS and Ubuntu 16.10. (CVE-2016-7568)
Emmanuel Law discovered that the GD library incorrectly handled certain strings when creating images. If a user or automated system were tricked into processing a specially crafted image, an attacker could cause a denial of service, or possibly execute arbitrary code. (CVE-2016-8670)
- Record
USN-3117-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
phpTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-bcmathTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-cliTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-commonTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-dbaTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-develTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-embeddedTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-enchantTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-fpmTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-gdTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
Show 40 moreShow less
| Package | Affected | Fixed |
|---|---|---|
php-imapTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-intlTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-ldapTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-mbstringTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-mysqlTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-odbcTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-pdoTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-pgsqlTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-processTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-pspellTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-recodeTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-snmpTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-soapTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-tidyTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-xmlTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-xmlrpcTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
php-ztsTuxCare:CentOS:6 |
before 5.3.3-51.el6.cloudlinux | 5.3.3-51.el6.cloudlinux |
libgd2Debian:12 |
before 2.2.3-87-gd0fec80-1 | 2.2.3-87-gd0fec80-1 |
libgd2Debian:13 |
before 2.2.3-87-gd0fec80-1 | 2.2.3-87-gd0fec80-1 |
libgd2Debian:14 |
before 2.2.3-87-gd0fec80-1 | 2.2.3-87-gd0fec80-1 |
libgd2Debian:7 |
before 2.0.36~rc1~dfsg-6.1+deb7u6, plus listed versions 2.0.36~rc1~dfsg-6.12.0.36~rc1~dfsg-6.1+deb7u12.0.36~rc1~dfsg-6.1+deb7u22.0.36~rc1~dfsg-6.1+deb7u32.0.36~rc1~dfsg-6.1+deb7u42.0.36~rc1~dfsg-6.1+deb7u5 |
2.0.36~rc1~dfsg-6.1+deb7u6 |
libgd2Debian:8 |
before 2.1.0-5+deb8u7, plus listed versions 2.1.0-52.1.0-5+deb8u12.1.0-5+deb8u22.1.0-5+deb8u32.1.0-5+deb8u42.1.0-5+deb8u52.1.0-5+deb8u6 |
2.1.0-5+deb8u7 |
libgdMageia:5 |
before 2.2.3-1.4.mga5 | 2.2.3-1.4.mga5 |
gdSUSE:Linux Enterprise Desktop 12 SP1 |
before 2.1.0-17.1 | 2.1.0-17.1 |
gdSUSE:Linux Enterprise Software Development Kit 12 SP1 |
before 2.1.0-17.1 | 2.1.0-17.1 |
gdSUSE:Linux Enterprise Server 12 SP1 |
before 2.1.0-17.1 | 2.1.0-17.1 |
gdSUSE:Linux Enterprise Server for SAP Applications 12 SP1 |
before 2.1.0-17.1 | 2.1.0-17.1 |
gdSUSE:Linux Enterprise Workstation Extension 12 SP1 |
before 2.1.0-17.1 | 2.1.0-17.1 |
gdSUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 2.0.36.RC1-52.25.1 | 2.0.36.RC1-52.25.1 |
gdSUSE:Linux Enterprise Server 11 SP4 |
before 2.0.36.RC1-52.25.1 | 2.0.36.RC1-52.25.1 |
gdSUSE:Linux Enterprise Server for SAP Applications 11 SP4 |
before 2.0.36.RC1-52.25.1 | 2.0.36.RC1-52.25.1 |
php53SUSE:Linux Enterprise Software Development Kit 11 SP4 |
before 5.3.17-87.1 | 5.3.17-87.1 |
php53SUSE:Linux Enterprise Server 11 SP4 |
before 5.3.17-87.1 | 5.3.17-87.1 |
php53SUSE:Linux Enterprise Server for SAP Applications 11 SP4 |
before 5.3.17-87.1 | 5.3.17-87.1 |
php7SUSE:Linux Enterprise Module for Web and Scripting 12 |
before 7.0.7-20.1 | 7.0.7-20.1 |
php7SUSE:Linux Enterprise Software Development Kit 12 SP1 |
before 7.0.7-20.1 | 7.0.7-20.1 |
php5SUSE:Linux Enterprise Module for Web and Scripting 12 |
before 5.5.14-83.1 | 5.5.14-83.1 |
php5SUSE:Linux Enterprise Software Development Kit 12 SP1 |
before 5.5.14-83.1 | 5.5.14-83.1 |
libgd2Ubuntu:14.04:LTS |
before 2.1.0-3ubuntu0.5, plus listed versions 2.1.0-22.1.0-32.1.0-3ubuntu0.12.1.0-3ubuntu0.22.1.0-3ubuntu0.3 |
2.1.0-3ubuntu0.5 |
libgd2Ubuntu:16.04:LTS |
before 2.1.1-4ubuntu0.16.04.5, plus listed versions 2.1.1-4build12.1.1-4build22.1.1-4ubuntu0.16.04.12.1.1-4ubuntu0.16.04.22.1.1-4ubuntu0.16.04.3 |
2.1.1-4ubuntu0.16.04.5 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-8670 is a critical vulnerability (CVSS 9.8) in Libgd, published October 14, 2016. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.75%, the 91st percentile. Fixed in php 5.3.3-51.el6.cloudlinux.
References
php.net/ChangeLog-7.php
securityfocus.com/bid/93594
github.com/libgd/libgd/commit/53110871935244816bbb9d131da0bccff734bfe9
openwall.com/lists/oss-security/2016/10/15/1
debian.org/security/2016/dsa-3693
bugs.php.net/bug.php?id=73280
Show 28 moreShow less
php.net/ChangeLog-5.php
support.f5.com/csp/article/K21336065?utm_source=f5support&%3Butm_medium=RSS
nvd.nist.gov/vuln/detail/CVE-2016-8670
support.f5.com/csp/article/K21336065?utm_source=f5support&utm_medium=RSS
github.com/advisories/GHSA-7hrm-234x-37p5
docs.bell-sw.com/security/cves/CVE-2016-8670
errata.cloudlinux.com/els6/CLSA-2020-1605798462.html
security-tracker.debian.org/tracker/CVE-2016-8670
advisories.mageia.org/MGASA-2016-0421.html
bugs.mageia.org/show_bug.cgi?id=19594
ubuntu.com/usn/usn-3117-1
suse.com/support/update/announcement/2016/suse-su-20162668-1
bugzilla.suse.com/1001900
bugzilla.suse.com/1004924
bugzilla.suse.com/1005274
suse.com/security/cve/CVE-2016-6911
suse.com/security/cve/CVE-2016-7568
suse.com/security/cve/CVE-2016-8670
suse.com/support/update/announcement/2016/suse-su-20162670-1
suse.com/support/update/announcement/2016/suse-su-20162681-1
suse.com/support/update/announcement/2016/suse-su-20162683-1
suse.com/support/update/announcement/2016/suse-su-20162683-2
suse.com/support/update/announcement/2016/suse-su-20162766-1
ubuntu.com/security/CVE-2016-8670
ubuntu.com/security/notices/USN-3117-1
cve.org/CVERecord?id=CVE-2016-8670
ubuntu.com/security/CVE-2016-6911
ubuntu.com/security/CVE-2016-7568
Left out here: the rest of 1 source description. The JSON record has them.