Search code examples
databasesql-injection

If my database user is read only, why do I need to worry about sql injection?


Can they (malicious users) describe tables and get vital information? What about if I lock down the user to specific tables? I'm not saying I want sql injection, but I wonder about old code we have that is susceptible but the db user is locked down. Thank you.

EDIT: I understand what you are saying but if I have no response.write for the other data, how can they see it. The bringing to crawl and dos make sense, so do the others but how would they actually see the data?


Solution

  • Someone could inject SQL to cause an authorization check to return the equivalent of true instead of false to get access to things that should be off-limits.

    Or they could inject a join of a catalog table to itself 20 or 30 times to bring database performance to a crawl.

    Or they could call a stored procedure that runs as a different database user that does modify data.