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 Oct 24, 2026 · Also known as ALPINE-CVE-2016-3074, DEBIAN-CVE-2016-3074, DSA-3556-1, MGASA-2016-0152, 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 36% 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)

36%

Higher than 98.5% of all scored CVEs

Exploit maturity

Proof of concept

ATLAS score

53/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

239 affected entries in total
ProductAffected versionsFixed in
LibgdLibgd2.1.12.1.1-1.1.mga5
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, 5.3.3-51.el6.cloudlinux

Libgd

2.1.1-1.1.mga5

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.3.3-51.el6.cloudlinux, 5.5.35

php-bcmath

5.3.3-51.el6.cloudlinux

php-cli

5.3.3-51.el6.cloudlinux

php-common

5.3.3-51.el6.cloudlinux

php-dba

5.3.3-51.el6.cloudlinux

php-devel

5.3.3-51.el6.cloudlinux

php-embedded

5.3.3-51.el6.cloudlinux

php-enchant

5.3.3-51.el6.cloudlinux

php-fpm

5.3.3-51.el6.cloudlinux

php-imap

5.3.3-51.el6.cloudlinux

php-intl

5.3.3-51.el6.cloudlinux

php-ldap

5.3.3-51.el6.cloudlinux

php-mbstring

5.3.3-51.el6.cloudlinux

php-mysql

5.3.3-51.el6.cloudlinux

php-odbc

5.3.3-51.el6.cloudlinux

php-pdo

5.3.3-51.el6.cloudlinux

php-pgsql

5.3.3-51.el6.cloudlinux

php-process

5.3.3-51.el6.cloudlinux

php-pspell

5.3.3-51.el6.cloudlinux

php-recode

5.3.3-51.el6.cloudlinux

Timeline

  1. Publicly disclosed

    Apr 26, 2016

  2. Last updated

    Oct 24, 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 Dec 5, 2026. Compiled by Brandefense technologies from public vulnerability catalogs; scoring as described in How it works.

To report an error, contact Brandefense.