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.11

Type: remote

Family: CGI abuses

Published: 4/11/2012

Updated: 4/11/2022

Configuration: Enable paranoid mode, Enable thorough checks

Supported Sensors: Nessus

Risk Information

CVSS v2

Risk Factor: Medium

Base Score: 6.8

Temporal Score: 5.3

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

CVSS v3

Risk Factor: Medium

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, Settings/ParanoidReport, installed_sw/Apache

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 4/28/2009

Vulnerability Publication Date: 4/8/2009

Reference Information

BID: 52065