PHP Restaurants 1.0 – SQLi Authentication Bypass & Cross Site Scripting (XSS)
A vulnerability exists in the PHP Restaurants 1.0 software, which allows an attacker to bypass authentication and perform Cross Site Scripting (XSS) attacks. The vulnerability is due to the lack of input validation in the login function of the functions.php file. An attacker can exploit this vulnerability by sending a specially crafted request to the login.php page with an email and password parameter containing an SQL injection payload. This will allow the attacker to bypass authentication and gain access to the admin page. Additionally, an attacker can exploit the Cross Site Scripting (XSS) vulnerability by sending a specially crafted request to the index.php page with a search parameter containing an XSS payload. This will allow the attacker to execute malicious JavaScript code in the context of the web browser.