what is the worst that could happen to my database if my PHP code has a SQL injection vulnerability in the where statement, ie SELECT * FROM table WHERE id='$unescapedstring'?
sorry forgot to mention mysql
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While the other answers are completely correct, if you have your mysql user accounts set up correctly, the account executing those queries probably shouldn’t have permissions to alter/create/drop tables/databases. Therefore, worst that could happend in that scenario:
DELETE FROM table