Vulnerabilities / CVE-2016-8670

critical

CVE-2016-8670

php: Stack based buffer overflow in dynamicGetbuf

Published Modified CWE 119
In the Trivy database since at least 24 Oct 2026, 07:11 UTCWhen it arrived before that build is not recorded.

Severity by source

NVD9.8CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat8.1CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Red Hat (medium), Amazon (medium), Ubuntu (medium).

Description

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.

Affected packages and fixed versions

SourcePackageFixed in
amazon linux 1php56, php56-bcmath, php56-cli and 29 more5.6.29-1.131.amzn1
debian 11libgd22.2.3-87-gd0fec80-1
debian 12libgd22.2.3-87-gd0fec80-1
debian 13libgd22.2.3-87-gd0fec80-1
debian 14libgd22.2.3-87-gd0fec80-1
debian 7libgd22.0.36~rc1~dfsg-6.1+deb7u6
debian 8libgd22.1.0-5+deb8u7
echolibgd22.2.3-87-gd0fec80-1
Red Hatgd, gd-devel, gd-progs and 88 moreno fix listed
seal Red Hat 7gd, seal-gd2.0.35-27.el7_9+sp999
ubuntu 12.04libgd22.0.36~rc1~dfsg-6ubuntu2.3
ubuntu 14.04libgd22.1.0-3ubuntu0.5
Show all 138 entries from 16 sources
SourcePackageFixed in
amazon linux 1php565.6.29-1.131.amzn1
amazon linux 1php56-bcmath5.6.29-1.131.amzn1
amazon linux 1php56-cli5.6.29-1.131.amzn1
amazon linux 1php56-common5.6.29-1.131.amzn1
amazon linux 1php56-dba5.6.29-1.131.amzn1
amazon linux 1php56-dbg5.6.29-1.131.amzn1
amazon linux 1php56-debuginfo5.6.29-1.131.amzn1
amazon linux 1php56-devel5.6.29-1.131.amzn1
amazon linux 1php56-embedded5.6.29-1.131.amzn1
amazon linux 1php56-enchant5.6.29-1.131.amzn1
amazon linux 1php56-fpm5.6.29-1.131.amzn1
amazon linux 1php56-gd5.6.29-1.131.amzn1
amazon linux 1php56-gmp5.6.29-1.131.amzn1
amazon linux 1php56-imap5.6.29-1.131.amzn1
amazon linux 1php56-intl5.6.29-1.131.amzn1
amazon linux 1php56-ldap5.6.29-1.131.amzn1
amazon linux 1php56-mbstring5.6.29-1.131.amzn1
amazon linux 1php56-mcrypt5.6.29-1.131.amzn1
amazon linux 1php56-mssql5.6.29-1.131.amzn1
amazon linux 1php56-mysqlnd5.6.29-1.131.amzn1
amazon linux 1php56-odbc5.6.29-1.131.amzn1
amazon linux 1php56-opcache5.6.29-1.131.amzn1
amazon linux 1php56-pdo5.6.29-1.131.amzn1
amazon linux 1php56-pgsql5.6.29-1.131.amzn1
amazon linux 1php56-process5.6.29-1.131.amzn1
amazon linux 1php56-pspell5.6.29-1.131.amzn1
amazon linux 1php56-recode5.6.29-1.131.amzn1
amazon linux 1php56-snmp5.6.29-1.131.amzn1
amazon linux 1php56-soap5.6.29-1.131.amzn1
amazon linux 1php56-tidy5.6.29-1.131.amzn1
amazon linux 1php56-xml5.6.29-1.131.amzn1
amazon linux 1php56-xmlrpc5.6.29-1.131.amzn1
debian 11libgd22.2.3-87-gd0fec80-1
debian 12libgd22.2.3-87-gd0fec80-1
debian 13libgd22.2.3-87-gd0fec80-1
debian 14libgd22.2.3-87-gd0fec80-1
debian 7libgd22.0.36~rc1~dfsg-6.1+deb7u6
debian 8libgd22.1.0-5+deb8u7
echolibgd22.2.3-87-gd0fec80-1
Red Hatgdno fix listed
Red Hatgd-develno fix listed
Red Hatgd-progsno fix listed
Red Hatphpno fix listed
Red Hatphp-bcmathno fix listed
Red Hatphp-clino fix listed
Red Hatphp-commonno fix listed
Red Hatphp-dbano fix listed
Red Hatphp-develno fix listed
Red Hatphp-embeddedno fix listed
Red Hatphp-enchantno fix listed
Red Hatphp-fpmno fix listed
Red Hatphp-gdno fix listed
Red Hatphp-imapno fix listed
Red Hatphp-intlno fix listed
Red Hatphp-ldapno fix listed
Red Hatphp-mbstringno fix listed
Red Hatphp-mysqlno fix listed
Red Hatphp-mysqlndno fix listed
Red Hatphp-odbcno fix listed
Red Hatphp-pdono fix listed
Red Hatphp-pgsqlno fix listed
Red Hatphp-processno fix listed
Red Hatphp-pspellno fix listed
Red Hatphp-recodeno fix listed
Red Hatphp-snmpno fix listed
Red Hatphp-soapno fix listed
Red Hatphp-tidyno fix listed
Red Hatphp-xmlno fix listed
Red Hatphp-xmlrpcno fix listed
Red Hatphp-ztsno fix listed
Red Hatrh-php56-phpno fix listed
Red Hatrh-php56-php-bcmathno fix listed
Red Hatrh-php56-php-clino fix listed
Red Hatrh-php56-php-commonno fix listed
Red Hatrh-php56-php-dbano fix listed
Red Hatrh-php56-php-dbgno fix listed
Red Hatrh-php56-php-develno fix listed
Red Hatrh-php56-php-embeddedno fix listed
Red Hatrh-php56-php-enchantno fix listed
Red Hatrh-php56-php-fpmno fix listed
Red Hatrh-php56-php-gdno fix listed
Red Hatrh-php56-php-gmpno fix listed
Red Hatrh-php56-php-imapno fix listed
Red Hatrh-php56-php-intlno fix listed
Red Hatrh-php56-php-ldapno fix listed
Red Hatrh-php56-php-mbstringno fix listed
Red Hatrh-php56-php-mysqlndno fix listed
Red Hatrh-php56-php-odbcno fix listed
Red Hatrh-php56-php-opcacheno fix listed
Red Hatrh-php56-php-pdono fix listed
Red Hatrh-php56-php-pgsqlno fix listed
Red Hatrh-php56-php-processno fix listed
Red Hatrh-php56-php-pspellno fix listed
Red Hatrh-php56-php-recodeno fix listed
Red Hatrh-php56-php-snmpno fix listed
Red Hatrh-php56-php-soapno fix listed
Red Hatrh-php56-php-tidyno fix listed
Red Hatrh-php56-php-xmlno fix listed
Red Hatrh-php56-php-xmlrpcno fix listed
Red Hatrh-php70-phpno fix listed
Red Hatrh-php70-php-bcmathno fix listed
Red Hatrh-php70-php-clino fix listed
Red Hatrh-php70-php-commonno fix listed
Red Hatrh-php70-php-dbano fix listed
Red Hatrh-php70-php-dbgno fix listed
Red Hatrh-php70-php-develno fix listed
Red Hatrh-php70-php-embeddedno fix listed
Red Hatrh-php70-php-enchantno fix listed
Red Hatrh-php70-php-fpmno fix listed
Red Hatrh-php70-php-gdno fix listed
Red Hatrh-php70-php-gmpno fix listed
Red Hatrh-php70-php-imapno fix listed
Red Hatrh-php70-php-intlno fix listed
Red Hatrh-php70-php-jsonno fix listed
Red Hatrh-php70-php-ldapno fix listed
Red Hatrh-php70-php-mbstringno fix listed
Red Hatrh-php70-php-mysqlndno fix listed
Red Hatrh-php70-php-odbcno fix listed
Red Hatrh-php70-php-opcacheno fix listed
Red Hatrh-php70-php-pdono fix listed
Red Hatrh-php70-php-pgsqlno fix listed
Red Hatrh-php70-php-processno fix listed
Red Hatrh-php70-php-pspellno fix listed
Red Hatrh-php70-php-recodeno fix listed
Red Hatrh-php70-php-snmpno fix listed
Red Hatrh-php70-php-soapno fix listed
Red Hatrh-php70-php-tidyno fix listed
Red Hatrh-php70-php-xmlno fix listed
Red Hatrh-php70-php-xmlrpcno fix listed
Red Hatrh-php70-php-zipno fix listed
seal Red Hat 7gd2.0.35-27.el7_9+sp999
seal Red Hat 7seal-gd2.0.35-27.el7_9+sp999
ubuntu 12.04libgd22.0.36~rc1~dfsg-6ubuntu2.3
ubuntu 14.04libgd22.1.0-3ubuntu0.5
ubuntu 14.04-ESMlibgd22.1.0-3ubuntu0.5
ubuntu 16.04libgd22.1.1-4ubuntu0.16.04.5
ubuntu 16.04-ESMlibgd22.1.1-4ubuntu0.16.04.5
ubuntu 16.10libgd22.2.1-1ubuntu3.2

References

All 12 references

Vulnerability data compiled from the Trivy vulnerability database (trivy-db, Aqua Security, Apache License 2.0), which aggregates third-party advisories. CVE records are published by The MITRE Corporation under the CVE Terms of Use; CVE is a trademark of MITRE. This product uses data from the NVD API but is not endorsed or certified by the NVD. Severity, titles and advisory data from the GitHub Advisory Database (CC BY 4.0), Red Hat security data (CC BY 4.0) and the other sources linked on each entry. Entries may be summarised or re-formatted; the linked original is the authoritative record.