$controllerClass can contain request data and is used in code execution context(s) leading to a potential security vulnerability.
1 path for user data to reach this point
Fetching key REQUEST_URI from $_SERVER, and $url is assigned
in
src/Core/Request.php on line 26
$url is passed through explode(), and $url is assigned
in
src/Core/Request.php on line 34
$url is assigned
in
src/Core/Request.php on line 35
$url is passed through trim(), and trim($url) is passed through trim(), and $url is assigned
in
src/Core/Request.php on line 36
$url is passed through explode(), and $partList is assigned
in
src/Core/Request.php on line 38
$partList is passed through implode(), and Request::$route is assigned
in
src/Core/Request.php on line 67
Tainted property Request::$route is read
in
src/Core/Request.php on line 146
Request::route() returns tainted data, and $request->route() is passed through str_replace(), and $controllerClass is assigned
in
src/Core/DefaultRoute.php on line 30
General Strategies to prevent injection
In general, it is advisable to prevent any user-data to reach this point. This can be done by
white-listing certain values:
if ( ! in_array($value, array('this-is-allowed', 'and-this-too'), true)) {
throw new \InvalidArgumentException('This input is not allowed.');
}
For numeric data, we recommend to explicitly cast the data:
$controllerClass
can contain request data and is used in code execution context(s) leading to a potential security vulnerability.1 path for user data to reach this point
REQUEST_URI
from$_SERVER,
and$url
is assignedin src/Core/Request.php on line 26
$url
is passed through explode(), and$url
is assignedin src/Core/Request.php on line 34
$url
is assignedin src/Core/Request.php on line 35
$url
is passed through trim(), andtrim($url)
is passed through trim(), and$url
is assignedin src/Core/Request.php on line 36
$url
is passed through explode(), and$partList
is assignedin src/Core/Request.php on line 38
$partList
is passed through implode(), and Request::$route is assignedin src/Core/Request.php on line 67
in src/Core/Request.php on line 146
$request->route()
is passed through str_replace(), and$controllerClass
is assignedin src/Core/DefaultRoute.php on line 30
General Strategies to prevent injection
In general, it is advisable to prevent any user-data to reach this point. This can be done by white-listing certain values:
For numeric data, we recommend to explicitly cast the data: