vendor:
PHP
by:
David Vieira-Kurz
N/A
CVSS
N/A
Full Path Disclosure
200
CWE
Product Name: PHP
Affected Version From: PHP 5.3 and prior
Affected Version To: PHP 5.2.11 and prior
Patch Exists: Yes
Related CWE: N/A
CPE: a:php:php
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
2009
PHP <=5.3 - preg_match() full path disclosure
There is a full path disclosure vulnerability concerning the preg_match() php function which allow attackers to gather the real path of the server side script. The preg_match() PHP function takes strings as parameters and will raise warnings when values that are passed are arrays rather then strings. To get the path of the current script, you simply need to pass the arguments as arrays rather then expected strings and then simply read the warning message generated by PHP to see the error including the full path of the current running script.
Mitigation:
Upgrade to the latest version of PHP and use the ini_set() function to turn off the error messages.