You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't consider it a huge security issue since Gii should not be enabled on production ever. That's an easy way to disrupt the project by rewriting custom code with generated one.
I found an issue that causes Remote Code Execution by improper input validation in a
$this->messageCategory
variable.As a result, a remote attacker with an access to https://localhost/gii/ endpoint can execute arbitrary PHP code to template file, and then run it.
To fix issue, we can replace the
$str = "Yii::t('" . $this->messageCategory . "', '" . $string . "'" . $ph . ")";
to
$str = "Yii::t('" . addslashes($this->messageCategory) . "', '" . $string . "'" . $ph . ")";
in a file:
yii2-gii/src/Generator.php
Line 505 in ee4d072
The text was updated successfully, but these errors were encountered: