CVE-2014-5120

NameCVE-2014-5120
Descriptiongd_ctx.c in the GD component in PHP 5.4.x before 5.4.32 and 5.5.x before 5.5.16 does not ensure that pathnames lack %00 sequences, which might allow remote attackers to overwrite arbitrary files via crafted input to an application that calls the (1) imagegd, (2) imagegd2, (3) imagegif, (4) imagejpeg, (5) imagepng, (6) imagewbmp, or (7) imagewebp function.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, bugtraq, EDB, Metasploit, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, Mageia, GitHub code/issues, web search, more)
NVD severitymedium (attack range: remote)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
libgd2 (PTS)jessie2.1.0-5+deb8u11fixed
jessie (security)2.1.0-5+deb8u13fixed
stretch (security), stretch2.2.4-2+deb9u4fixed
bullseye, sid, buster2.2.5-5.2fixed
php5 (PTS)jessie5.6.33+dfsg-0+deb8u1fixed
jessie (security)5.6.40+dfsg-0+deb8u4fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
libgd2source(unstable)(not affected)
php5source(unstable)5.4.0-1medium
php5sourcesqueeze(not affected)

Notes

[squeeze] - php5 <not-affected> (Introduced in 5.4)
- libgd2 <not-affected> (Specific to integration of gd in PHP)
https://bugs.php.net/bug.php?id=67730
https://bugs.php.net/patch-display.php?bug_id=67730&patch=gd-null-injection&revision=latest
For the PHP5 5.4 branch this issue is fixed in version 5.4.32
fixed in Debian with the gdIOCtx.patch patch

Search for package or bug name: Reporting problems