Double Free in libgd - CVE-2021-40145
Published: April 6, 2023
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code on the target system.
The vulnerability exists due to a boundary error within the gdImageGd2Ptr() function in gd_gd2.c. A remote attacker can pass specially crafted data to the application, trigger double free error and execute arbitrary code on the target system.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
Amazon Linux AMI
Ubuntu
libgd3 (Ubuntu package)
gd
How to mitigate CVE-2021-40145
libgd3 (Ubuntu package) - addressed in versions Ubuntu Pro, 2.2.5-4ubuntu0.5, 2.2.5-5.2ubuntu2.1, 2.3.0-2ubuntu0.1
gd - update to 2.0.35-11.11