Integer overflow in the _gd2GetHeader function in gd_gd2.c in the GD Graphics Library (aka libgd) before 2.2.3, as used in PHP before 5.5.37, 5.6.x before 5.6.23, and 7.x before 7.0.8, allows remote attackers to cause a denial of service (heap-based buffer overflow and application crash) or possibly have unspecified other impact via crafted chunk dimensions in an image.
CVE-2016-5766
Score 8.8 from GitHub Security Advisory (severity: HIGH) published 2022-05-14. NVD baseline CVSS 8.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 8.8
- EG Score
- 8.8HIGHmedium confidence
- EG Risk
- 47EG Risk 47/100CISA SSVC
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity88% × 45%Exploitation8% × 40%Automatability30% × 15%CISA SSVC: Track at low or medium mission impact; Track or Attend at high (mission-essential systems).Action: A fix is available. Apply it within your standard update timelines at low or medium mission impact and sooner than that at high. - EPSS PROB
- 7.5%
- EPSS %ILE
- 94th
- KEV
- Not listed
CISA SSVCTrack at low or medium mission impact; Track or Attend at high (mission-essential systems).
A fix is available. Apply it within your standard update timelines at low or medium mission impact and sooner than that at high.
Exploitation none (no KEV listing, exploit record or EPSS ≥ 50%) · Automatable unknown (not published for this CVE) · Technical impact partial (CVSS below 9.0). Mission impact is CISA's Mission & Well-being decision point, and only you can judge it: high means the affected system is essential to your organisation's mission, or its compromise could cause irreversible harm to people. CISA's decision table
Published
August 7, 2016
Last Modified
June 17, 2026
Advisory Details (7)
Auto-updated May 10, 2026oss-security - Re: CVE for PHP 5.5.37 issues
http://www.openwall.com/lists/oss-security/2016/06/23/4Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap ov… · php/php-src@7722455 · GitHub
http://github.com/php/php-src/commit/7722455726bec8c53458a32851d2a87982cf0eac?w=1Vendor Advisories for CVE-2016-5766(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Patch Availability(4)
| Vendor / Ecosystem | Fix (by version range) / Patch | Released | Source |
|---|---|---|---|
| ubuntu | libgd3 (2.1.1-4ubuntu0.16.04.2) @ xenial | 2026-05-22 | ubuntu |
| redhat | gd-0:2.0.35-27.el7_9 | 2020-12-15 | redhat |
| redhat | rh-php56-php-pear-1:1.9.5-4.el7 | 2016-11-15 | redhat |
| redhat | php-0:5.4.16-42.el7 | 2016-11-03 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Affected Packages
(9 across 9 ecosystems)
Alpine:v3.2(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| gd | — |
| — |
Alpine:v3.3(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| gd | — |
| — |
Alpine:v3.4(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| gd | — |
| — |
Debian:11(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| libgd2 | — |
| — |
Debian:12(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| libgd2 | — |
| — |
Debian:13(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| libgd2 | — |
| — |
Debian:14(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| libgd2 | — |
| — |
Debian:7(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| libgd2 | 2.0.36~rc1~dfsg-6.1, 2.0.36~rc1~dfsg-6.1+deb7u1, 2.0.36~rc1~dfsg-6.1+deb7u2, 2.0.36~rc1~dfsg-6.1+deb7u3 |
| — |
Debian:8(1)
| Package | Vulnerable range | Fix by version range | Dependents |
|---|---|---|---|
| libgd2 | 2.1.0-5, 2.1.0-5+deb8u1, 2.1.0-5+deb8u2, 2.1.0-5+deb8u3 |
| — |
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(3)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
Data Freshness Timeline
(refreshed 5× in last 7d / 22× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
Showing the most recent 100 of 155 total refreshes for this CVE.
- 2026-10-05 17:38 UTCEPSS rescore
- 2026-10-03 14:21 UTCEPSS rescore
- 2026-10-03 14:21 UTCEPSS rescore
- 2026-09-30 14:58 UTCEPSS rescore
- 2026-09-30 09:14 UTCEG score recompute
- 2026-09-28 13:45 UTCEPSS rescore
- 2026-09-27 13:40 UTCEPSS rescore
- 2026-09-26 15:53 UTCEPSS rescore
- 2026-09-26 15:53 UTCEPSS rescore
- 2026-09-24 13:59 UTCEPSS rescore
- 2026-09-23 13:41 UTCEPSS rescore
- 2026-09-19 15:35 UTCEPSS rescore
- 2026-09-18 22:12 UTCOSV refresh
- 2026-09-18 19:22 UTCEPSS rescore
- 2026-09-17 19:22 UTCEPSS rescore
- 2026-09-16 05:05 UTCEPSS rescore
- 2026-09-15 03:05 UTCEPSS rescore
- 2026-09-12 14:55 UTCEPSS rescore
- 2026-09-11 14:46 UTCEPSS rescore
- 2026-09-11 09:31 UTCEPSS rescore
- 2026-09-10 09:26 UTCEPSS rescore
- 2026-09-07 15:56 UTCEPSS rescore
- 2026-09-04 13:56 UTCEPSS rescore
- 2026-09-02 14:07 UTCEPSS rescore
- 2026-09-01 13:48 UTCEPSS rescore
Show 75 moreShow fewer
- 2026-09-01 03:31 UTCEPSS rescore
- 2026-08-31 01:46 UTCOSV refresh
- 2026-08-28 21:35 UTCEPSS rescore
- 2026-08-27 14:20 UTCEPSS rescore
- 2026-08-26 14:41 UTCEPSS rescore
- 2026-08-25 13:44 UTCEPSS rescore
- 2026-08-21 23:44 UTCEPSS rescore
- 2026-08-19 16:59 UTCEPSS rescore
- 2026-08-18 13:43 UTCEPSS rescore
- 2026-08-17 13:42 UTCEPSS rescore
- 2026-08-16 14:51 UTCEPSS rescore
- 2026-08-16 02:10 UTCEPSS rescore
- 2026-08-15 01:25 UTCEPSS rescore
- 2026-08-14 10:29 UTCOSV refresh
- 2026-08-12 13:46 UTCEPSS rescore
- 2026-08-11 13:36 UTCEPSS rescore
- 2026-08-09 13:42 UTCEPSS rescore
- 2026-08-08 16:32 UTCEPSS rescore
- 2026-08-07 16:22 UTCEPSS rescore
- 2026-08-06 13:42 UTCEPSS rescore
- 2026-08-05 19:12 UTCEPSS rescore
- 2026-08-04 15:05 UTCEPSS rescore
- 2026-08-02 02:22 UTCEPSS rescore
- 2026-08-01 04:11 UTCEPSS rescore
- 2026-07-30 16:24 UTCEPSS rescore
- 2026-07-30 01:26 UTCEPSS rescore
- 2026-07-30 01:26 UTCEPSS rescore
- 2026-07-29 20:37 UTCOSV refresh
- 2026-07-28 15:31 UTCEPSS rescore
- 2026-07-25 14:13 UTCEPSS rescore
- 2026-07-24 14:13 UTCEPSS rescore
- 2026-07-23 14:15 UTCEPSS rescore
- 2026-07-23 01:23 UTCEG score recompute
- 2026-07-22 22:03 UTCEG score recompute
- 2026-07-22 14:04 UTCEPSS rescore
- 2026-07-21 15:21 UTCEPSS rescore
- 2026-07-21 15:21 UTCEPSS rescore
- 2026-07-20 17:04 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 14:28 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-19 02:26 UTCEPSS rescore
- 2026-07-18 10:00 UTCEPSS rescore
- 2026-07-18 10:00 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-16 16:59 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-15 16:54 UTCEPSS rescore
- 2026-07-15 01:56 UTCEPSS rescore
- 2026-07-13 22:26 UTCEPSS rescore
- 2026-07-13 06:09 UTCEPSS rescore
- 2026-07-12 08:07 UTCOSV refresh
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-12 05:43 UTCEPSS rescore
- 2026-07-11 08:24 UTCEPSS rescore
- 2026-07-09 19:06 UTCEPSS rescore
- 2026-07-08 15:10 UTCEPSS rescore
- 2026-07-07 13:42 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 16:24 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-06 02:20 UTCEPSS rescore
- 2026-07-05 02:27 UTCEPSS rescore
- 2026-07-04 06:28 UTCEPSS rescore
- 2026-07-01 15:02 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-30 23:19 UTCEPSS rescore
- 2026-06-29 14:03 UTCEPSS rescore
- 2026-06-28 14:04 UTCEPSS rescore
- 2026-06-28 04:53 UTCEPSS rescore
- 2026-06-27 03:05 UTCEPSS rescore
- 2026-06-25 13:47 UTCEPSS rescore
- 2026-06-24 14:02 UTCEPSS rescore
- 2026-06-23 21:30 UTCEPSS rescore
- 2026-06-23 13:30 UTCOSV refresh
Related CVEs(same product + same vendor + same CWE)
Same product
10 shownAlpine:v3.2:gd · Alpine:v3.3:gd
- CVE-2016-3074EG 9.8EPSS p98CRITICAL
- CVE-2015-8874EG 7.5EPSS p95HIGH
- CVE-2016-6161EG 6.5MEDIUM
- CVE-2016-6128EG 7.5EPSS p94HIGH
- CVE-2016-6214EG 6.5MEDIUM
- CVE-2016-10168EG 7.8HIGH
- CVE-2016-10167EG 5.5EPSS p90MEDIUM
- CVE-2016-9317EG 5.5MEDIUM
- CVE-2016-5116EG 9.1EPSS p90CRITICAL
- CVE-2016-10166EG 9.8EPSS p96CRITICAL
Same vendor
10 shownredhat:RHSA-2016:2598 · redhat:RHSA-2016:2750
- CVE-2016-5768EG 9.8EPSS p95CRITICAL
- CVE-2016-5767EG 8.8EPSS p94HIGH
- CVE-2016-5399EG 7.8EPSS p95HIGH
- CVE-2013-7456EG 7.6EPSS p90HIGH
- CVE-2016-6128EG 7.5EPSS p94HIGH
- CVE-2016-4473EG 9.8EPSS p94CRITICAL
- CVE-2015-3210EG 9.8EPSS p95CRITICAL
- CVE-2016-7129EG 9.8EPSS p94CRITICAL
- CVE-2016-7127EG 9.8EPSS p94CRITICAL
- CVE-2016-7126EG 9.8EPSS p95CRITICAL
Same CWE
10 shownCWE-190
- CVE-2016-5767EG 8.8EPSS p94HIGH
- CVE-2016-5769EG 9.8EPSS p95CRITICAL
- CVE-2016-5096EG 8.6EPSS p91HIGH
- CVE-2016-5770EG 9.8EPSS p94CRITICAL
- CVE-2016-5095EG 8.6HIGH
- CVE-2016-5094EG 8.6EPSS p91HIGH
- CVE-2016-3078EG 9.8EPSS p99CRITICAL
- CVE-2016-1951EG 8.6HIGH
- CVE-2016-5261EG 8.8EPSS p91HIGH
- CVE-2016-6207EG 6.5EPSS p93MEDIUM
Frequently asked(5)
What is CVE-2016-5766?
When was CVE-2016-5766 disclosed?
Is CVE-2016-5766 actively exploited?
What is the CVSS score of CVE-2016-5766?
How do I remediate CVE-2016-5766?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2016-5766
Is Your Infrastructure Affected by CVE-2016-5766?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.