PHP 5.3.9 'php_register_variable_ex()' Code Execution (intrusive check)

critical Nessus Plugin ID 58039

Synopsis

The remote web server uses a version of PHP that is affected by a code execution vulnerability.

Description

The remote host is running a version of PHP that is affected by an arbitrary code execution vulnerability.

Specifically, the fix for the hash collision denial of service vulnerability (CVE-2011-4885) introduces a remote code execution vulnerability in the function 'php_register_variable_ex()' in the file 'php_variables.c'. A new configuration variable, 'max_input_vars', was added as a part of the fix. If the number of input variables exceeds this value and the variable being processed is an array, code execution can occur.

Note that this script assumes the 'max_input_vars' parameter is set to the default value of 1000, and only runs if 'Report paranoia' is set to 'Paranoid', and 'Enable CGI scanning' is checked.

Solution

Upgrade to PHP version 5.3.10 or later.

See Also

https://gist.github.com/pilate/1725489

http://www.php.net/ChangeLog-5.php#5.3.10

http://www.nessus.org/u?d1ee2de8

http://svn.php.net/viewvc?view=revision&revision=323007

Plugin Details

Severity: Critical

ID: 58039

File Name: php_5_3_9_ace.nasl

Version: 1.7

Type: remote

Family: CGI abuses

Published: 2/20/2012

Updated: 4/11/2022

Configuration: Enable paranoid mode, Enable thorough checks

Supported Sensors: Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.7

CVSS v2

Risk Factor: Critical

Base Score: 10

Temporal Score: 7.8

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

Vulnerability Information

CPE: cpe:/a:php:php

Required KB Items: www/PHP, Settings/ParanoidReport

Excluded KB Items: Settings/disable_cgi_scanning

Exploit Ease: No exploit is required

Patch Publication Date: 2/2/2012

Vulnerability Publication Date: 2/1/2012

Reference Information

CVE: CVE-2012-0830

BID: 51830