ID:               49693
 Updated by:       paj...@php.net
 Reported By:      david at majorsecurity dot info
-Status:           Open
+Status:           Bogus
 Bug Type:         Filter related
 Operating System: Unix
 PHP Version:      5.3.0
 New Comment:

Thanks for this report, it made my evening :)


Previous Comments:
------------------------------------------------------------------------

[2009-09-27 22:08:48] david at majorsecurity dot info

Description:
------------
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. I would NOT recommend to just react by "security through
obscurity" and turn off the error messages, error reporting etc.
This is not a solution because there are a lot of users that are having
a shared hosting server where they aren't able to manipulate
the "php.ini" configuration file - even ini_set() is forbidden on some
shared hoster servers. 
So they still would have the full path disclosure there. As general
workaround I would recommend to meticulously go through the code forcing
PHP to cast the data to the desired type, in this case the (string)
casts to eliminate the Notice or Warning messages. 

Reproduce code:
---------------
Proof of concept:
http://localhost/cms/modules/system/admin.php?fct=users&op[]=


Expected result:
----------------
Warning: preg_match() expects parameter 2 to be string, array given in
/htdocs/cms/include/common.php on line 105




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=49693&edit=1

Reply via email to