CVE-2016-7126

Publication date 12 September 2016

Last updated 25 August 2025


Ubuntu priority

Cvss 3 Severity Score

9.8 · Critical

Score breakdown

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.

Read the notes from the security team

Status

Package Ubuntu Release Status
libgd2 16.04 LTS xenial
Not affected
14.04 LTS trusty
Not affected
12.04 LTS precise
Not affected
php5 16.04 LTS xenial Not in release
14.04 LTS trusty
Not affected
12.04 LTS precise
Not affected
php7.0 16.04 LTS xenial
Not affected
14.04 LTS trusty Not in release
12.04 LTS precise Not in release

Notes


tyhicks

The PHP bug states that libgd2 is not affected and I've verified this through code review and testing.

Patch details

For informational purposes only. We recommend not to cherry-pick updates. How can I get the fixes?

Package Patch details
php7.0

Severity score breakdown

CVSS version: CVSS v3.0

Base score 9.8 · Critical

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H


Access our resources on patching vulnerabilities