CVE-2019-6978: The GD Graphics Library (aka LibGD) 2.2.5 has a double free in the gdImage*Ptr() functions in gd_gif_out.c, gd
CVE-2019-6978 is a critical-severity flaw (CVSS 9.8) affecting libgd, debian linux, ubuntu linux. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
The 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. NOTE: PHP is unaffected.
Why this priority
- Critical severity
- EPSS top 9%: very likely to be exploited
- Remotely exploitable, no login, no user action
- On your watchlist
No fix is published yet: follow the downgrade or mitigation steps.
Risk facts
| CVSS score | 9.8 (Critical) |
| Attack vector | Network (remote) |
| Attack complexity | Low |
| Privileges needed | None |
| User interaction | None |
| EPSS exploit chance | 4.5% (top 9%) |
| CISA exploited list | No |
| Weakness | CWE-415 |
| Published | 2019-01-28 |
| Last modified | 2026-06-17 |
Last updated 2026-06-17 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2019-6978?
libgd: downgrade or apply the listed mitigation; debian linux: mitigate or apply the listed mitigation; ubuntu linux: mitigate or apply the listed mitigation. Exact commands for each OS are on this page.
Is CVE-2019-6978 being exploited?
CVE-2019-6978 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2019-6978 affect?
CVE-2019-6978 affects libgd, debian linux, ubuntu linux. Severity is critical (CVSS 9.8). The 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. NOTE: PHP is unaffected.
How urgent is CVE-2019-6978?
Priority 67/100. Critical severity; EPSS top 9%: very likely to be exploited; Remotely exploitable, no login, no user action; On your watchlist
Software pages
PHP vulnerabilities · Ubuntu vulnerabilities · Debian vulnerabilities
Related CVEs
- CVE-2021-40812 MEDIUM 6.5 UPGRADE The GD Graphics Library (aka LibGD) through 2.3.2 has an out-of-bounds read because of the lack of certain gdG
- CVE-2021-40145 HIGH 7.5 UPGRADE gdImageGd2Ptr in gd_gd2.c in the GD Graphics Library (aka LibGD) through 2.3.2 has a double free
- CVE-2021-38115 MEDIUM 6.5 UPGRADE read_header_tga in gd_tga.c in the GD Graphics Library (aka LibGD) through 2.3.2 allows remote attackers to ca
- CVE-2019-6977 HIGH 8.8 DOWNGRADE UPGRADE gdImageColorMatch in gd_color_match.c in the GD Graphics Library (aka LibGD) 2.2.5, as used in the imagecolorm
- CVE-2019-11038 MEDIUM 5.3 DOWNGRADE UPGRADE When using the gdImageCreateFromXbm() function in the GD Graphics Library (aka LibGD) 2.2.5, as used in the PH