Memory corruption in GD Graphics Library and PHP - CVE-2009-3546

 

Memory corruption in GD Graphics Library and PHP - CVE-2009-3546

Published: May 2, 2018


Vulnerability identifier: #VU12348
CSH Severity: High
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U/U:Amber
CVE-ID: CVE-2009-3546
CWE-ID: CWE-119
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Boutell.Com, Inc.
PHP Group
Affected software:
GD Graphics Library
PHP

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The weakness exists in the _gdGetColors function in gd_gd.c due to improper verification of a certain colorsTotal structure member. A remote attacker can trick the victim into opening a specially crafted GD file, trigger buffer over-read or buffer overflow and execute arbitrary code.

Successful exploitation of the vulnerability may result in system compromise.


How to mitigate CVE-2009-3546

Update GD Graphics Library to 2.0.35 or PHP to 5.3.1.

Sources