Ubuntu 5.04 / 5.10 / 6.06 LTS : php4, php5 vulnerabilities (USN-342-1)

High Nessus Plugin ID 27921


The remote Ubuntu host is missing one or more security-related patches.


The sscanf() function did not properly check array boundaries. In applications which use sscanf() with argument swapping, a remote attacker could potentially exploit this to crash the affected web application or even execute arbitrary code with the application's privileges. (CVE-2006-4020)

The file_exists() and imap_reopen() functions did not perform proper open_basedir and safe_mode checks which could allow local scripts to bypass intended restrictions. (CVE-2006-4481)

On 64 bit systems the str_repeat() and wordwrap() functions did not properly check buffer boundaries. Depending on the application, this could potentially be exploited to execute arbitrary code with the applications' privileges. This only affects the amd64 and sparc platforms. (CVE-2006-4482)

A buffer overflow was discovered in the LWZReadByte_() function of the GIF image file parser. By tricking a PHP application into processing a specially crafted GIF image, a remote attacker could exploit this to execute arbitrary code with the application's privileges.

Note that Tenable Network Security has extracted the preceding description block directly from the Ubuntu security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.


Update the affected packages.

Plugin Details

Severity: High

ID: 27921

File Name: ubuntu_USN-342-1.nasl

Version: $Revision: 1.13 $

Type: local

Agent: unix

Published: 2007/11/10

Modified: 2016/05/27

Dependencies: 12634

Risk Information

Risk Factor: High


Base Score: 9.3

Temporal Score: 8.1

Vector: CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C

Temporal Vector: CVSS2#E:ND/RL:OF/RC:C

Vulnerability Information

CPE: p-cpe:/a:canonical:ubuntu_linux:libapache2-mod-php4, p-cpe:/a:canonical:ubuntu_linux:libapache2-mod-php5, p-cpe:/a:canonical:ubuntu_linux:php-pear, p-cpe:/a:canonical:ubuntu_linux:php4, p-cpe:/a:canonical:ubuntu_linux:php4-cgi, p-cpe:/a:canonical:ubuntu_linux:php4-cli, p-cpe:/a:canonical:ubuntu_linux:php4-common, p-cpe:/a:canonical:ubuntu_linux:php4-dev, p-cpe:/a:canonical:ubuntu_linux:php5, p-cpe:/a:canonical:ubuntu_linux:php5-cgi, p-cpe:/a:canonical:ubuntu_linux:php5-cli, p-cpe:/a:canonical:ubuntu_linux:php5-common, p-cpe:/a:canonical:ubuntu_linux:php5-curl, p-cpe:/a:canonical:ubuntu_linux:php5-dev, p-cpe:/a:canonical:ubuntu_linux:php5-gd, p-cpe:/a:canonical:ubuntu_linux:php5-ldap, p-cpe:/a:canonical:ubuntu_linux:php5-mhash, p-cpe:/a:canonical:ubuntu_linux:php5-mysql, p-cpe:/a:canonical:ubuntu_linux:php5-mysqli, p-cpe:/a:canonical:ubuntu_linux:php5-odbc, p-cpe:/a:canonical:ubuntu_linux:php5-pgsql, p-cpe:/a:canonical:ubuntu_linux:php5-recode, p-cpe:/a:canonical:ubuntu_linux:php5-snmp, p-cpe:/a:canonical:ubuntu_linux:php5-sqlite, p-cpe:/a:canonical:ubuntu_linux:php5-sybase, p-cpe:/a:canonical:ubuntu_linux:php5-xmlrpc, p-cpe:/a:canonical:ubuntu_linux:php5-xsl, cpe:/o:canonical:ubuntu_linux:5.04, cpe:/o:canonical:ubuntu_linux:5.10, cpe:/o:canonical:ubuntu_linux:6.06:-:lts

Required KB Items: Host/cpu, Host/Ubuntu, Host/Ubuntu/release, Host/Debian/dpkg-l

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2006/09/07

Vulnerability Publication Date: 2006/08/04

Reference Information

CVE: CVE-2006-4020, CVE-2006-4481, CVE-2006-4482, CVE-2006-4484

BID: 19415, 19582

OSVDB: 27824, 28002, 28003, 28004

USN: 342-1

CWE: 119