Skip to content
WatchlistCritical

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

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
ProductAffected versionsFixed in
LibgdLibgd2.1.1n/a
PHPPHPSee advisory5.5.35
Ubuntu LinuxCanonical12.04, 14.04, 15.10, 16.04n/a
Debian LinuxDebian7.0, 8.0n/a
FedoraFedoraproject23, 24n/a
20 more affected products in the full CVE brief

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

  1. Publicly disclosed

    Apr 26, 2016

  2. Last updated

    Aug 7, 2026

Weakness Type

  • CWE-122 Heap-based Buffer Overflow
  • CWE-681 Incorrect Conversion between Numeric Types

References

15 more references in the full CVE brief

FAQ

Common Questions.

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

Figures as of Oct 19, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.