PHP 5.2.x filter_globals Subsequence Request Parsing Remote Code Execution

Medium Nessus Plugin ID 58681

Synopsis

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

Description

According to its banner, the version of PHP installed on the remote host is in the 5.2 release branch. As such, it reportedly may be affected by a remote code execution vulnerability.

An error in the file 'ext/filter/filter.c' does not properly clear the 'filter_globals' struct if PHP encounters issues during its start up process. This struct then contains stale values and can allow an attacker to use a specially crafted request to crash PHP, obtain sensitive information or possibly execute arbitrary code.

Note that this issue reportedly only affects PHP when running as an Apache module and not in other configurations such as CGI, nor when used with other web servers such as IIS.

Solution

Upgrade to PHP version 5.3.0 or later.

See Also

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

https://seclists.org/bugtraq/2012/Feb/93

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

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

Plugin Details

Severity: Medium

ID: 58681

File Name: php_5_3_0.nasl

Version: 1.9

Type: remote

Family: CGI abuses

Published: 2012/04/11

Updated: 2018/11/15

Dependencies: 48243, 48204

Configuration: Enable paranoid mode

Risk Information

Risk Factor: Medium

CVSS v2.0

Base Score: 6.8

Temporal Score: 5.3

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

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

CVSS v3.0

Base Score: 5.6

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

Vulnerability Information

CPE: cpe:/a:php:php

Required KB Items: www/PHP, installed_sw/Apache, Settings/ParanoidReport

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 2009/04/28

Vulnerability Publication Date: 2009/04/08

Reference Information

BID: 52065