Skip to content
Fencer Vulns
critical 9.8

CVE-2016-8670 json

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 b…

published 2017-01-04 9 y ago modified 2026-06-17 4 mo ago also EUVD-2016-9509

cvss
9.8
version 3.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.7%
EPSS 4.7% chance of exploitation in 30 days, percentile 91%
public exploits
0
none known

Summary

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.

Patch / fix

  • libgd2 Debian 14, Debian 13, Debian 12 2.2.3-87-gd0fec80-1

debian advisories DEBIAN-CVE-2016-8670

  • libgd2 Ubuntu 14.04 LTS 2.1.0-3ubuntu0.5
  • libgd2 Ubuntu 16.04 LTS 2.1.1-4ubuntu0.16.04.5

ubuntu advisories UBUNTU-CVE-2016-8670

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • php5 SLE Software Development Kit 12 SP1, SLE Module for Web and Scripting 12 5.5.14-83.1
  • php7 SLE Software Development Kit 12 SP1, SLE Module for Web and Scripting 12 7.0.7-20.1
  • php53 SLES for SAP 11 SP4, SLES 11 SP4, SLE Software Development Kit 11 SP4 5.3.17-87.1
  • gd SLES for SAP 12 SP1, SLES 12 SP1, SLED 12 SP1 +2 more 2.1.0-17.1
  • gd SLES for SAP 11 SP4, SLES 11 SP4, SLE Software Development Kit 11 SP4 2.0.36.RC1-52.25.1

suse advisories SUSE-SU-2016:2766-1SUSE-SU-2016:2683-1SUSE-SU-2016:2683-2SUSE-SU-2016:2681-1SUSE-SU-2016:2668-1SUSE-SU-2016:2670-1

  • php Arch Linux 7.0.13-1

arch linux advisories AVG-58

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2016-8670 updated cvss 8.1

php: Stack based buffer overflow in dynamicGetbuf

  • Red Hat Enterprise Linux 5 gd, php, php53 Red Hat Enterprise Linux 6 gd, php, php-gd, php-cli, php-dba, php-fpm, +22 more Red Hat Enterprise Linux 7 gd, php, php-gd, php-cli, php-dba, php-fpm, +20 more Red Hat OpenShift Enterprise 2 gd, php Red Hat Software Collections rh-php56-php, rh-php70-php, rh-php56-php-gd, rh-php70-php-gd, rh-php56-php-cli, rh-php56-php-dba, +52 more
    affected: no fix planned “Will not fix”

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.75% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
NVD 3.0 9.8 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

Weakness
  • CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.