$command 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
Read from $_GET, and $query ?: $_GET is passed to ServerRequest::__construct()
in
vendor/src/ServerRequestFactory.php on line 71
ServerRequest::$queryParams is assigned
in
vendor/src/ServerRequest.php on line 101
Tainted property ServerRequest::$queryParams is read
in
vendor/src/ServerRequest.php on line 156
ServerRequest::getQueryParams() returns tainted data, and $rawQuery is assigned
in
src/mvc/MvcResolver.php on line 53
$query is assigned
in
src/mvc/MvcResolver.php on line 55
$query is assigned
in
src/mvc/MvcResolver.php on line 56
MvcResolver::$uri is assigned
in
src/mvc/MvcResolver.php on line 58
Tainted property MvcResolver::$uri is read, and $this->uri is passed through substr(), and substr($this->uri, 0, $key ?: strlen($this->uri)) is passed through explode(), and $uriBlocks is assigned
in
src/mvc/MvcResolver.php on line 84
$uriBlocks is passed to MvcResolver::prepareAction()
in
src/mvc/MvcResolver.php on line 93
$uriBlocks is passed through array_shift(), and MvcResolver::$action is assigned
in
src/mvc/MvcResolver.php on line 202
Tainted property MvcResolver::$action is read
in
src/mvc/MvcResolver.php on line 264
MvcResolver::getAction() returns tainted data, and $action is assigned
in
src/base/Application.php on line 88
(string) $action is passed to Console::action()
in
src/base/Application.php on line 97
$name is passed through ucfirst(), and $command is assigned
in
src/cli/Console.php on line 51
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:
$command
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
$_GET,
and$query ?: $_GET
is passed to ServerRequest::__construct()in vendor/src/ServerRequestFactory.php on line 71
in vendor/src/ServerRequest.php on line 101
in vendor/src/ServerRequest.php on line 156
$rawQuery
is assignedin src/mvc/MvcResolver.php on line 53
$query
is assignedin src/mvc/MvcResolver.php on line 55
$query
is assignedin src/mvc/MvcResolver.php on line 56
in src/mvc/MvcResolver.php on line 58
$this->uri
is passed through substr(), andsubstr($this->uri, 0, $key ?: strlen($this->uri))
is passed through explode(), and$uriBlocks
is assignedin src/mvc/MvcResolver.php on line 84
$uriBlocks
is passed to MvcResolver::prepareAction()in src/mvc/MvcResolver.php on line 93
$uriBlocks
is passed through array_shift(), and MvcResolver::$action is assignedin src/mvc/MvcResolver.php on line 202
in src/mvc/MvcResolver.php on line 264
$action
is assignedin src/base/Application.php on line 88
(string) $action
is passed to Console::action()in src/base/Application.php on line 97
$name
is passed through ucfirst(), and$command
is assignedin src/cli/Console.php on line 51
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: