In PHP, Remote file inclusion can be conducted via input from $_GET
, $_POST
, $_COOKIE
. I know it is improbable, but is it possible (by any chance) to fake the value come out of $_SERVER
?
I mean, can $_SERVER
become the source of Remote file inclusion even on rare occasion?
$_SERVER is an array containing information on paths used to access the request, headers etc.
A number of the values are directly set and manipulated by the user (such as QUERY_STRING) so it is potentially vulnerable in exactly the same way as $_GET and $_POST. That depends on how you use those values in your own code though.
Did you have a specific index of $_SERVER in mind that you wouldn't want faking?