Ethredah / PHP-Blog-Admin

A PHP Admin Dashboard / Website (with blog section)
117 stars 57 forks source link

Remove unused file that contains SQL injection #13

Closed RobTheFiveNine closed 1 year ago

RobTheFiveNine commented 2 years ago

There is an unused file found in admin/functions/login.php. Within this file, however, is an SQL injection that can be used to bypass authentication and login as any admin user.

To see this working, create the following HTML file, replace the URL with your installation and hit the "Login" button, and you will be authenticated as the first admin user in the database:

<form method="post" action="http://10.2.0.132/admin/functions/login.php">
  <input type="text" value="admin@blog.local" name="email" />
  <input type="text" value="' or 'a'='a" name="password" />
  <input type="submit" value="Login" />
</form>

This pull request removes this file due to it no longer being in use and posing a security risk.