PHP 5.6.x < 5.6.9 Multiple Vulnerabilities

high Nessus Network Monitor Plugin ID 8786

Synopsis

The remote web server uses a version of PHP that is affected by multiple vulnerabilities.

Description

Versions of PHP 5.6.x earlier than 5.6.9 are exposed to the following issues :

- Multiple flaws exist related to using pathnames containing NULL bytes. A remote attacker can exploit these flaws, by combining the '\0' character with a safe file extension, to bypass access restrictions. This had been previously fixed but was reintroduced by a regression in versions 5.4+. (CVE-2006-7243, CVE-2015-4025)

- A flaw exists in the phar_parse_tarfile() function in 'ext/phar/tar.c' that is triggered when handling zero-length filenames. This may allow an attacker to corrupt memory, crashing an application or potentially allowing code execution. (CVE-2015-4021)

- An integer overflow condition exists in the ftp_genlist() function in 'ftp.c' due to improper validation of user-supplied input. A remote attacker can exploit this to cause a heap-based buffer overflow, resulting in a denial of service condition or possible remote code execution. (CVE-2015-4022)

- A flaw exists in the multipart_buffer_headers() function in 'rfc1867.c' due to improper handling of multipart/form-data in HTTP requests. A remote attacker can exploit this flaw to cause a consumption of CPU resources, resulting in a denial of service condition. (CVE-2015-4024)

- A security bypass vulnerability exists due to a flaw in the 'pcntl_exec' implementation that truncates a pathname upon encountering the '\x00' character. A remote attacker can exploit this, via a crafted first argument, to bypass intended extension restrictions and execute arbitrary files. (CVE-2015-4026)

- The PCRE library contains an overflow condition in the functions 'pcre_compile2()' and 'compile_branch()'. These issues are triggered as user-supplied input is not properly validated when handling regex. This may allow a context-dependent attacker to cause a heap-based buffer overflow, resulting in a denial of service or potentially allowing the execution of arbitrary code. (CVE-2015-2325, CVE-2015-2326)

- An integer overflow condition exists in the function str_repeat(). The issue is triggered due to a sign mismatch condition. This may allow a context-dependent attacker to create corrupted ZVALs, leading to memory corruption. This may result in a denial of service or potentially the execution of arbitrary code.

- An overflow condition affects the unpack() function in 'ext/standard/pack.c'. The issue is triggered as user-supplied input passed via the 'format' parameter is not properly validated. This may allow a context-dependent attacker to cause a heap-based buffer overflow, resulting in a denial of service or potentially allowing the execution of arbitrary code.

- An unspecified flaw exists in the zend_std_get_method() function in 'Zend/zend_compile.c' that may allow an attacker to trigger an invalid read. No further details have been provided by the vendor.

Solution

Apply the vendor patch or upgrade to PHP version 5.6.9 or later.

See Also

https://bugs.php.net/bug.php?id=69522

https://bugs.php.net/bug.php?id=69403

http://php.net/ChangeLog-5.php#5.6.9

https://bugs.php.net/bug.php?id=69420

Plugin Details

Severity: High

ID: 8786

Family: Web Servers

Published: 6/18/2015

Updated: 3/6/2019

Nessus ID: 83519

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

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

CVSS v3

Risk Factor: High

Base Score: 8.1

Temporal Score: 7.7

Vector: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Temporal Vector: CVSS:3.0/E:X/RL:O/RC:C

Vulnerability Information

CPE: cpe:/a:php:php

Patch Publication Date: 5/14/2015

Vulnerability Publication Date: 5/12/2015

Reference Information

CVE: CVE-2006-7243, CVE-2015-2325, CVE-2015-2326, CVE-2015-4021, CVE-2015-4022, CVE-2015-4024, CVE-2015-4025, CVE-2015-4026

BID: 74700, 74902, 74903, 75056, 44951, 74904, 74702