Description
Libgd version 2.2.5 contains a Double Free Vulnerability vulnerability in gdImageBmpPtr Function that can result in Remote Code Execution . This attack appear to be exploitable via Specially Crafted Jpeg Image can trigger double free. This vulnerability appears to have been fixed in after commit ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libgd2 | 2.2.5-4.1 | — |
| Debian 13 | libgd2 | 2.2.5-4.1 | — |
| Debian 12 | libgd2 | 2.2.5-4.1 | — |
| Debian 8 | libgd2 | 2.1.0-5+deb8u12 | DLA-1651-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | libgd2 | 2.2.5-4ubuntu0.2 | USN-3755-1 |
| Ubuntu 16.04 LTS | libgd2 | 2.1.1-4ubuntu0.16.04.10 | USN-3755-1 |
| Ubuntu 14.04 LTS | libgd2 | 2.1.0-3ubuntu0.10 | USN-3755-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP1 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
| SLES 15 | gd | 2.2.5-4.3.1 | SUSE-SU-2018:2888-1 |
| SLES 15 | php7 | 7.2.5-4.9.1 | SUSE-SU-2022:4067-1, SUSE-SU-2018:2840-1 |
| SLES 12 SP3 | gd | 2.1.0-24.9.1 | SUSE-SU-2018:2837-1 |
Show 6 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP1 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
| SLES for SAP 15 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
| SLES for SAP 12 SP3 | gd | 2.1.0-24.9.1 | SUSE-SU-2018:2837-1 |
| SLE HPC 15 SP1 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
| SLE HPC 15 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
| SUSE Enterprise Storage 6 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | gd | 2.3.3-1.1 | openSUSE-SU-2024:10777-1 |
| openSUSE Tumbleweed | php7 | 7.4.24-1.1 | openSUSE-SU-2024:11167-1 |
| openSUSE Tumbleweed | php8 | 8.0.11-1.1 | openSUSE-SU-2024:11169-1 |
| openSUSE Leap 15.4 | php7 | 7.2.34-150000.4.103.1 | SUSE-SU-2022:4067-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | gd | 2.2.5-r1 | — |
| Alpine v3.23 | gd | 2.2.5-r1 | — |
| Alpine v3.22 | gd | 2.2.5-r1 | — |
| Alpine v3.21 | gd | 2.2.5-r1 | — |
| Alpine v3.20 | gd | 2.2.5-r1 | — |
Show 15 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.19 | gd | 2.2.5-r1 | — |
| Alpine v3.18 | gd | 2.2.5-r1 | — |
| Alpine v3.17 | gd | 2.2.5-r1 | — |
| Alpine v3.16 | gd | 2.2.5-r1 | — |
| Alpine v3.15 | gd | 2.2.5-r1 | — |
| Alpine v3.14 | gd | 2.2.5-r1 | — |
| Alpine v3.13 | gd | 2.2.5-r1 | — |
| Alpine v3.12 | gd | 2.2.5-r1 | — |
| Alpine v3.11 | gd | 2.2.5-r1 | — |
| Alpine v3.10 | gd | 2.2.5-r1 | — |
| Alpine v3.9 | gd | 2.2.5-r1 | — |
| Alpine v3.8 | gd | 2.2.5-r1 | — |
| Alpine v3.7 | gd | 2.2.5-r1 | — |
| Alpine v3.6 | gd | 2.2.5-r1 | — |
| Alpine v3.5 | gd | 2.2.5-r1 | — |
Advisories 9
- USN-3755-1 libgd2 vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- DLA-1651-1 libgd2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2022:4067-1 Security update for php7 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:2888-1 Security update for gd SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11167-1 php7-7.4.24-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:2837-1 Security update for gd SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11169-1 php8-8.0.11-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2018:2840-1 Security update for php7 SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:10777-1 gd-2.3.3-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
References
- https://github.com/libgd/libgd/issues/447
- USN-3755-1 vendor-advisory
- [debian-lts-announce] 20190130 [SECURITY] [DLA 1651-1] libgd2 security update mailing-list
- GLSA-201903-18 vendor-advisory
- FEDORA-2020-e795f92d79 vendor-advisory