
CVE catalog
CVE-2016-7127
libgd2: CVE-2016-7127
- Severity
- Critical · CVSS 9.8
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 6.84% · Oct 25, 2026
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 to cause a denial of service (out-of-bounds write) or possibly have unspecified other impact by providing different signs for the second and third arguments.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | libgd2 | sid | 2.3.3-14 | not affected |
| Debian | libgd2 | forky | 2.3.3-14 | not affected |
| Debian | libgd2 | trixie | 2.3.3-14~deb13u1 | not affected |
| Debian | libgd2 | trixie-security | 2.3.3-14~deb13u1 | not affected |
| Debian | libgd2 | bookworm | 2.3.3-9 | not affected |
| Debian | libgd2 | bookworm-security | 2.3.3-9+deb12u1 | not affected |
| Ubuntu | php5 | 14.04 | 5.5.3+dfsg-1ubuntu2 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.3+dfsg-1ubuntu3 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.6+dfsg-1ubuntu1 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.6+dfsg-1ubuntu2 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.8+dfsg-2ubuntu1 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu1 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu2 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu3 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.1 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.2 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.3 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.4 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.5 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.6 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.7 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.9 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.11 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.12 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.13 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.14 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.16 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.17 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.19 | vulnerable |
| Ubuntu | php5 | 14.04 | 5.5.9+dfsg-1ubuntu4.20 | fixed |
| Ubuntu | php7.0 | 16.04 | 7.0.1-5 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.1-6 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.2-1 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.2-3 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.2-4 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.2-5 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.3-2 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.3-3 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.3-9ubuntu1 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.4-5ubuntu1 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.4-5ubuntu2 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.4-7ubuntu1 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.4-7ubuntu2 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.4-7ubuntu2.1 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.8-0ubuntu0.16.04.1 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.8-0ubuntu0.16.04.2 | vulnerable |
| Ubuntu | php7.0 | 16.04 | 7.0.8-0ubuntu0.16.04.3 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | libgd2 | source | sid | Not affected | unimportant | Not reported | Not reported |
| Debian | libgd2 | source | forky | Not affected | unimportant | Not reported | Not reported |
| Debian | libgd2 | source | trixie | Not affected | unimportant | Not reported | Not reported |
| Debian | libgd2 | source | bookworm | Not affected | unimportant | Not reported | Not reported |
| Ubuntu | php5 | deb | 14.04 | 5.5.9+dfsg-1ubuntu4.20 | Not reported | UBUNTU-CVE-2016-7127 | Not reported |
| Ubuntu | php7.0 | deb | 16.04 | 7.0.8-0ubuntu0.16.04.3 | Not reported | UBUNTU-CVE-2016-7127 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
[Debian 12 (Bookworm)]
- [libgd3]Unknown
Source package: [libgd2]
Details (4)
2.3.3-9· amd64 · bookwormNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9· arm64 · bookwormNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9+deb12u1· amd64 · bookworm-securityNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9+deb12u1· arm64 · bookworm-securityNot affected
dsa · libgd2 · debian · bookworm
- [libgd-dev]Unknown
Source package: [libgd2]
Details (4)
2.3.3-9· amd64 · bookwormNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9· arm64 · bookwormNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9+deb12u1· amd64 · bookworm-securityNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9+deb12u1· arm64 · bookworm-securityNot affected
dsa · libgd2 · debian · bookworm
- [libgd-tools]Unknown
Source package: [libgd2]
Details (4)
2.3.3-9· amd64 · bookwormNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9· arm64 · bookwormNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9+deb12u1· amd64 · bookworm-securityNot affected
dsa · libgd2 · debian · bookworm
2.3.3-9+deb12u1· arm64 · bookworm-securityNot affected
dsa · libgd2 · debian · bookworm
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/suse-su-2016_2328-1.json]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2016-7127]
- [https://security-tracker.debian.org/tracker/CVE-2016-7127]
- [https://security.access.redhat.com/data/csaf/v2/vex/2016/cve-2016-7127.json]
[Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]