PHP < 5.3.12 / 5.4.x < 5.4.2 CGI Query String Code Execution

High Nessus Network Monitor Plugin ID 6993


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


PHP versions earlier than 5.3.12 / 5.4.2 are affected by the following vulnerabilities.

An error in the file 'sapi/cgi/cgi_main.c' can allow a remote attacker to obtain PHP source code from the web server or to potentially execute arbitrary code. In vulnerable configurations, PHP treats certain query string parameters as command line arguments including switches such as '-s', '-d', and '-c'.

Note that this vulnerability is exploitable only when PHP is used in CGI-based configurations. Apache with 'mod_php' is not an exploitable configuration.


Upgrade to PHP version 5.3.12 / 5.4.2 or later. A 'mod_rewrite' workaround is available as well.

See Also

Plugin Details

Severity: High

ID: 6993

Family: Web Servers

Published: 2013/08/20

Updated: 2019/03/06

Dependencies: 8682, 8728

Nessus ID: 58988

Risk Information

Risk Factor: High

CVSS v2.0

Base Score: 8.3

Temporal Score: 6.9

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

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

CVSS v3.0

Base Score: 6.9

Temporal Score: 6.4

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

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

Vulnerability Information

CPE: cpe:/a:php:php

Patch Publication Date: 2012/05/03

Vulnerability Publication Date: 2012/05/03

Exploitable With


Metasploit (PHP CGI Argument Injection)

Reference Information

CVE: CVE-2012-1823

BID: 53388