Description
Integer signedness error in the dynamicGetbuf function in gd_io_dp.c in the GD Graphics Library (aka libgd) through 2.2.3, as used in PHP before 5.6.28 and 7.x before 7.0.13, allows remote attackers to cause a denial of service (stack-based buffer overflow) or possibly have unspecified other impact via a crafted imagecreatefromstring call.
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.3-87-gd0fec80-1 | — |
| Debian 13 | libgd2 | 2.2.3-87-gd0fec80-1 | — |
| Debian 12 | libgd2 | 2.2.3-87-gd0fec80-1 | — |
| Debian 8 | libgd2 | 2.1.0-5+deb8u7 | DSA-3693-1 |
| Debian 7 | libgd2 | 2.0.36~rc1~dfsg-6.1+deb7u6 | DLA-665-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | libgd2 | 2.1.1-4ubuntu0.16.04.5 | USN-3117-1 |
| Ubuntu 14.04 LTS | libgd2 | 2.1.0-3ubuntu0.5 | USN-3117-1 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 12 SP1 | gd | 2.1.0-17.1 | SUSE-SU-2016:2668-1 |
| SLES 12 SP1 | php5 | 5.5.14-83.1 | SUSE-SU-2016:2766-1 |
| SLES 12 SP1 | php7 | 7.0.7-20.1 | SUSE-SU-2016:2683-1 |
| SLES 12 | php5 | 5.5.14-83.1 | SUSE-SU-2016:2766-1 |
| SLES 12 | php7 | 7.0.7-20.1 | SUSE-SU-2016:2683-2, SUSE-SU-2016:2683-1 |
| SLES 11 SP4 | gd | 2.0.36.RC1-52.25.1 | SUSE-SU-2016:2670-1 |
| SLES 11 SP4 | php53 | 5.3.17-87.1 | SUSE-SU-2016:2681-1 |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 12 SP1 | gd | 2.1.0-17.1 | SUSE-SU-2016:2668-1 |
| SLES for SAP 11 SP4 | gd | 2.0.36.RC1-52.25.1 | SUSE-SU-2016:2670-1 |
| SLES for SAP 11 SP4 | php53 | 5.3.17-87.1 | SUSE-SU-2016:2681-1 |
Advisories 9
- USN-3117-1 libgd2 vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- DLA-665-1 libgd2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-3693-1 libgd2 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- SUSE-SU-2016:2681-1 Security update for php53 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2668-1 Security update for gd SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2683-2 Security update for php7 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2683-1 Security update for php7 SUSE / openSUSE Security Updates · Feb 4, 2026
- SUSE-SU-2016:2766-1 Security update for php5 SUSE / openSUSE Security Updates · May 2, 2025
- SUSE-SU-2016:2670-1 Security update for gd SUSE / openSUSE Security Updates · May 2, 2025
References
- http://www.php.net/ChangeLog-7.php
- 93594 vdb-entry
- https://github.com/libgd/libgd/commit/53110871935244816bbb9d131da0bccff734bfe9
- [oss-security] 20161015 CVE Request: libgd: Stack Buffer Overflow in GD dynamicGetbuf mailing-list
- DSA-3693 vendor-advisory
- https://bugs.php.net/bug.php?id=73280
- http://www.php.net/ChangeLog-5.php
- https://support.f5.com/csp/article/K21336065?utm_source=f5support&%3Butm_medium=RSS