CVE-2016-7127

The imagegammacorrect function in ext/gd/gd.c in PHP before 5.6.25 and 7.x before 7.0.10 does not properly validate gamma values, which allows remote attackers…

published September 12, 2016

CVSS
—
EPSS
7%
Percentile
94.0
In the wild
Unconfirmed
What it is

⚠️ A simple gamma value mismatch could lead to a denial of service in PHP! 🎨 Think of it like a chef misjudging the balance of flavors in a dish — one wrong spice can spoil the entire meal. In this case, providing different signs for the gamma values can create chaos instead of a balanced image output. An attacker could exploit this vulnerability to cause an out-of-bounds write, leading to a denial of service. This could crash the server or create unpredictable behavior in applications relying on PHP's GD library.

Put simply

Think of it like a chef misjudging the balance of flavors in a dish — one wrong spice can spoil the entire meal. In this case, providing different signs for the gamma values can create chaos instead of a balanced image output. The issue lies in the `imagegammacorrect` function within PHP's GD library. It fails to validate the gamma values properly, allowing attackers to manipulate the function with conflicting arguments, potentially causing memory corruption.

What to do

An attacker could exploit this vulnerability to cause an out-of-bounds write, leading to a denial of service. This could crash the server or create unpredictable behavior in applications relying on PHP's GD library. Upgrade PHP to version 5.6.25 or 7.0.10 or later to patch this vulnerability. It's also a good idea to review your code for any reliance on unsafe gamma corrections, ensuring proper input validation in your applications. You've got this! Stay vigilant and keep your PHP updated to maintain your security hero status! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.06842 · 94.0th percentile
Published
2016-09-12T01:00Z
EPSS history
Timeline
  • 12 SEP 01:00Z
    The imagegammacorrect function in ext/gd/gd.c in PHP before 5.6.25 and 7.x before 7.0.10 does not properly validate gamma values, which allows remote attackers…
    cvelistv5