Description
The LZW decoding in the gdImageCreateFromGifPtr function in the Thomas Boutell graphics draw (GD) library (aka libgd) 2.0.33 allows remote attackers to cause a denial of service (CPU consumption) via malformed GIF data that causes an infinite loop.
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.0.33-5 | — |
| Debian 13 | libgd2 | 2.0.33-5 | — |
| Debian 12 | libgd2 | 2.0.33-5 | — |
| Debian 3.1 | libgd2 | 2.0.33-1.1sarge1 | DSA-1117 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- GD Graphics Library 2.0.33 - Remote Denial of Service EDB-27981 · dos · Jun 6, 2006 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DSA-1117 libgd2 - insufficient input sanitising Debian Security (DSA / DLA) · Mar 9, 2026
References
- gdgraphicslibrary-gif-dos(26976) vdb-entry
- 23783 third-party-advisory
- 21186 third-party-advisory
- 20887 third-party-advisory
- USN-298-1 vendor-advisory
- 21050 third-party-advisory
- SUSE-SA:2006:031 vendor-advisory
- 20060606 libgd 2.0.33 infinite loop in GIF decoding ? mailing-list
- 2006-0038 vendor-advisory
- MDKSA-2006:113 vendor-advisory
- 1067 third-party-advisory
- ADV-2006-2174 vdb-entry
- 20676 third-party-advisory
- https://issues.rpath.com/browse/RPL-939
- DSA-1117 vendor-advisory
- MDKSA-2006:122 vendor-advisory
- 20853 third-party-advisory
- MDKSA-2006:112 vendor-advisory
- 18294 vdb-entry
- 20866 third-party-advisory
- 20500 third-party-advisory
- 20571 third-party-advisory