Vulnerabilities / CVE-2016-7126

critical

CVE-2016-7126

php: select_colors write out-of-bounds

Published Modified CWE 787
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.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Red Hat7.5CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

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

Description

The imagetruecolortopalette function in ext/gd/gd.c in PHP before 5.6.25 and 7.x before 7.0.10 does not properly validate the number of colors, which allows remote attackers to cause a denial of service (select_colors allocation error and out-of-bounds write) or possibly have unspecified other impact via a large value in the third argument.

Affected packages and fixed versions

SourcePackageFixed in
debian 8php55.6.26+dfsg-0+deb8u1
Red Hatphp, php-bcmath, php-cli and 25 moreno fix listed
Show all 29 entries from 2 sources
SourcePackageFixed in
debian 8php55.6.26+dfsg-0+deb8u1
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

References

All 14 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.