CVE-2016-3074Libgd Heap Buffer Overflow
Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2) allows remote attackers to cause a denial of service (crash) or potentially execute arbitrary code via crafted compressed gd2 data, which triggers a heap-based buffer overflow.
Published Apr 26, 2016 · Updated Aug 7, 2026 · Also known as ALPINE-CVE-2016-3074, DEBIAN-CVE-2016-3074, DSA-3556-1, UBUNTU-CVE-2016-3074
Key Facts
Patch immediately- CVE-2016-3074 is a critical-severity vulnerability (CVSS 9.8 v3.1) affecting Libgd, PHP, Ubuntu Linux (Canonical) and 22 more products.
- It is not listed in any known-exploited vulnerabilities catalog. A public exploit is reported by tracking sources, but no code link is listed yet.
- EPSS estimates a 37% probability of exploitation in the next 30 days.
- Fixed versions are available, including apache2-mod_php5 5.6.1-57.1, apache2-mod_php5 5.6.1-66.1, apache2-mod_php5-debuginfo 5.6.1-57.1.
- Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.
Scores
CVSS v3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS (30-day exploit likelihood)
37%
Higher than 98.5% of all scored CVEs
Exploit maturity
Proof of concept
ATLAS score
54/100
Publication score, see How it works
Exploitation Verdict
KEV listed
Not listed
Federal due date
None
No federal due date
Ransomware use
Not reported
Attributed actors
None named
Exploit & Defence Guidance
Exploit maturity
Proof of concept
Public exploit code
3
Proof-of-concept links
In-the-wild evidence
1
Reports of active use
Advisories And Exploit References
Description
Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2) allows remote attackers to cause a denial of service (crash) or potentially execute arbitrary code via crafted compressed gd2 data, which triggers a heap-based buffer overflow.
Affected Products
211 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| LibgdLibgd | 2.1.1 | n/a |
| PHPPHP | See advisory | 5.5.35 |
| Ubuntu LinuxCanonical | 12.04, 14.04, 15.10, 16.04 | n/a |
| Debian LinuxDebian | 7.0, 8.0 | n/a |
| FedoraFedoraproject | 23, 24 | n/a |
Patched Releases
apache2-mod_php5
5.6.1-57.1, 5.6.1-66.1
apache2-mod_php5-debuginfo
5.6.1-57.1, 5.6.1-66.1
gd
2.2.1-r0, 2.2.1-r2
libgd2
2.0.36~rc1~dfsg-6.1+deb7u2, 2.1.0-3ubuntu0.1, 2.1.0-5+deb8u1, 2.1.1-4.1, 2.1.1-4ubuntu0.16.04.1
PHP
5.5.35
php5
5.6.1-57.1, 5.6.1-66.1, 5.6.22+dfsg-0+deb8u1
php5-bcmath
5.6.1-57.1, 5.6.1-66.1
php5-bcmath-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-bz2
5.6.1-57.1, 5.6.1-66.1
php5-bz2-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-calendar
5.6.1-57.1, 5.6.1-66.1
php5-calendar-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-ctype
5.6.1-57.1, 5.6.1-66.1
php5-ctype-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-curl
5.6.1-57.1, 5.6.1-66.1
php5-curl-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-dba
5.6.1-57.1, 5.6.1-66.1
php5-dba-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-debugsource
5.6.1-57.1, 5.6.1-66.1
php5-devel
5.6.1-57.1, 5.6.1-66.1
php5-dom
5.6.1-57.1, 5.6.1-66.1
php5-dom-debuginfo
5.6.1-57.1, 5.6.1-66.1
php5-enchant
5.6.1-57.1, 5.6.1-66.1
php5-enchant-debuginfo
5.6.1-57.1, 5.6.1-66.1
Timeline
Publicly disclosed
Apr 26, 2016
Last updated
Aug 7, 2026
Weakness Type
- CWE-122 Heap-based Buffer Overflow
- CWE-681 Incorrect Conversion between Numeric Types
References
- advisorysecurity.alpinelinux.org · CVE-2016-3074
- advisorysecurity-tracker.debian.org · CVE-2016-3074
- advisoryubuntu.com · CVE-2016-3074
- advisorycve.org · CVERecord
- advisoryFEDORA-2016-5f91f43826
FAQ
Common Questions.
Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2) allows remote attackers to cause a denial of service (crash) or potentially execute arbitrary code via crafted compressed gd2 data, which triggers a heap-based buffer overflow.
Affected: Libgd versions 2.1.1; PHP; Ubuntu Linux (Canonical) versions 12.04, 14.04, 15.10, 16.04, among others. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
A public exploit is reported by tracking sources, but no code link is listed yet.
Fixed versions are available, including apache2-mod_php5 5.6.1-57.1, apache2-mod_php5 5.6.1-66.1, apache2-mod_php5-debuginfo 5.6.1-57.1.
Brandefense priority: patch immediately, because public exploit code exists for a high-severity flaw.
Is CVE-2016-3074 On Your Attack Surface?
Brandefense matches it against the products discovered on your perimeter and opens a finding the day a CVE like this is listed.
Request A Demo