Description
Multiple integer overflows in the (1) createwbmp and (2) readwbmp functions in wbmp.c in the GD library (libgd) in PHP 4.0.0 through 4.4.6 and 5.0.0 through 5.2.1 allow context-dependent attackers to execute arbitrary code via Wireless Bitmap (WBMP) images with large width or height values.
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-1 | — |
| Debian 13 | libgd2 | 2.0.33-1 | — |
| Debian 12 | libgd2 | 2.0.33-1 | — |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 5 | php +18 | 5.1.6-11.el5 | RHSA-2007:0153 |
| RHEL 4 | php +13 | 4.3.9-3.22.4 | RHSA-2007:0155 |
| RHEL 3 | php +6 | 4.3.2-40.ent | RHSA-2007:0155 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Rhel Application Stack 1 | php +18 | 5.1.6-3.el4s1.6 | RHSA-2007:0162 |
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
- PHP 5.2.1 'GD' Extension - '.WBMP' File Integer Overflow EDB-29823 · dos · Apr 7, 2007 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2007:0162 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2007:0155 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2007:0153 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 26, 2026
References
- ADV-2007-2732 vdb-entry
- SSA:2007-127 vendor-advisory
- 25056 third-party-advisory
- 25151 third-party-advisory
- php-gd-overflow(33453) vdb-entry
- oval:org.mitre.oval:def:10179 vdb-entry signature
- 20070418 rPSA-2007-0073-1 php php-mysql php-pgsql mailing-list
- APPLE-SA-2007-07-31 vendor-advisory
- GLSA-200705-19 vendor-advisory
- RHSA-2007:0162 vendor-advisory
- http://us2.php.net/releases/4_4_7.php
- MDKSA-2007:090 vendor-advisory
- 20070407 PHP <= 5.2.1 wbmp file handling integer overflow mailing-list
- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/wbmp.c?r1=1.2.4.1&r2=1.2.4.1.8.1
- 24909 third-party-advisory
- http://ifsec.blogspot.com/2007/04/php-521-wbmp-file-handling-integer.html
- MDKSA-2007:087 vendor-advisory
- 24945 third-party-advisory
- https://issues.rpath.com/browse/RPL-1268
- http://us2.php.net/releases/5_2_2.php
- http://docs.info.apple.com/article.html?artnum=306172
- 24924 third-party-advisory
- 23357 vdb-entry
- RHSA-2007:0155 vendor-advisory
- ADV-2007-1269 vdb-entry
- 24965 third-party-advisory
- 25159 vdb-entry
- http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/wbmp.c?revision=1.2.4.1.8.1&view=markup
- MDKSA-2007:089 vendor-advisory
- 25445 third-party-advisory
- 24814 third-party-advisory
- SUSE-SA:2007:032 vendor-advisory
- MDKSA-2007:088 vendor-advisory
- 26235 third-party-advisory
- RHSA-2007:0153 vendor-advisory