CVE-2016-7126

critical
Published 2016-09-12 · Modified 2026-05-06
CVSS v3
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v2
7.5
VIR risk
9.8

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.

Predictions

Exploit likelihood
97%
Patch ETA

Heuristic predictions, AS-IS, for prioritization only.

Mitigations

vendor Authored 2026-05-27

Vendor advisory: debian — https://security-tracker.debian.org/tracker/CVE-2016-7126

vendor Authored 2026-05-27

Vendor advisory: suse — https://www.suse.com/security/cve/CVE-2016-7126.html

vendor Authored 2026-05-27

Vendor advisory: cve@mitre.org — https://github.com/php/php-src/commit/b6f13a5ef9d6280cf984826a5de012a32c396cd4?w=1

vendor Authored 2026-05-27

Vendor advisory: cve@mitre.org — https://github.com/php/php-src/commit/28022c9b1fd937436ab67bb3d61f652c108baf96

vendor Authored 2026-05-27

Vendor advisory: cve@mitre.org — http://www.php.net/ChangeLog-7.php

vendor Authored 2026-05-27

Vendor advisory: cve@mitre.org — http://www.php.net/ChangeLog-5.php

OS impact

OSVersionStatusFixed in
suse slesaffected
debian debianbookwormfixed0
debian debianbullseyefixed0
debian debianforkyfixed0
debian debiansidfixed0
debian debiantrixiefixed0

Application impact

VendorProductVersionsFixed
php phpphp7.0.0
php phpphp7.0.1
php phpphp7.0.2
php phpphp7.0.3
php phpphp7.0.4
php phpphp7.0.5
php phpphp7.0.6
php phpphp7.0.7
php phpphp7.0.8
php phpphp7.0.9
php phpphp{"endIncluding":"5.6.24"}

References

CWEs

CWE-787

Verify integrity in audit chain (admin only). AS-IS.