Double free vulnerability in the gdImagePngPtr function in libgd2 before 2.2.5 allows remote attackers to cause a denial of service via vect
Double free vulnerability in the gdImagePngPtr function in libgd2 before 2.2.5 allows remote attackers to cause a denial of service via vectors related to a palette with no colors.
- Published
- Sep 7, 2017
- Updated
- Jun 16, 2026
- EPSS
- 5.1% · 92th percentile
- CWE
- CWE-415
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
32
Monitor
Low priority for now.
- CVSS
- 30 / 40 · 7.5 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 2 / 30 · 5.1%
Affected systems
| Vendor | Product | CPE |
|---|---|---|
| libgd | libgd | cpe:2.3:a:libgd:libgd |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| canonical | ubuntu linux | cpe:2.3:o:canonical:ubuntu_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- canonical ubuntu linux16.04
- debian debian linux8.0
- debian debian linux9.0
- fedoraproject fedora26
- libgd libgd2.2.4
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Alpine:v3.4 | gd | before 2.2.5-r0 | 2.2.5-r0 |
| Debian:12 | libgd2 | before 2.2.5-1 | 2.2.5-1 |
| Debian:7 | libgd2 | before 2.0.36~rc1~dfsg-6.1+deb7u10 | 2.0.36~rc1~dfsg-6.1+deb7u10 |
| Debian:8 | libgd2 | before 2.1.0-5+deb8u11 | 2.1.0-5+deb8u11 |
| Debian:9 | libgd2 | before 2.2.4-2+deb9u2 | 2.2.4-2+deb9u2 |
| openSUSE:Tumbleweed | gd | before 2.3.3-1.1 | 2.3.3-1.1 |
| SUSE:Linux Enterprise Desktop 12 SP2 | gd | before 2.1.0-24.3.4 | 2.1.0-24.3.4 |
Same product
libgd: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-6977gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2.5, as used in the imagecolormatch function in PHP before 5.56Plan
- CVE-2016-3074Integer signedness error in GD Graphics Library 2.1.1 (aka libgd or libgd2) allows remote attackers to cause a denial of service (crash) or 50Plan
- CVE-2016-10166Integer underflow in the _gdContributionsAlloc function in gd_interpolation.c in the GD Graphics Library (aka libgd) before 2.2.4 allows rem42Plan
- CVE-2016-7568Integer overflow in the gdImageWebpCtx function in gd_webp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP through 7.41Plan
- CVE-2019-6978The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd_jpeg.c, and gd_wbmp.c.40Plan
- CVE-2016-6912Double free vulnerability in the gdImageWebPtr function in the GD Graphics Library (aka libgd) before 2.2.4 allows remote attackers to have 40Plan
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| alpine:gd | 2.2.5-r0 · Alpine:v3.4 | Package registry (OSV) |
| debian:libgd2 | 2.2.5-1 · Debian:12 | Package registry (OSV) |
| opensuse:gd | 2.3.3-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| suse:gd | 2.1.0-24.3.4 · SUSE:Linux Enterprise Desktop 12 SP2 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- none
- Integrity
- none
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- None
- Integrity impact
- None
- Availability impact
- High
Weakness class (CWE)
CWE-415 · Double FreeCVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpChange log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- www.debian.org/security/2017/dsa-3961
- github.com/libgd/libgd/issues/381
- github.com/libgd/libgd/releases/tag/gd-2.2.5
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/N2BLXX7KNRE7ZVQAKGTHHWS33CUCXVUP/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.