I am working on Java application which generate SQL prepared statements and stored procedure query strings using user inputs and executes with PreparedStatement.execute() or CallableStatement.execute() Example:
String query = "{? = call UserSuppliedStoredProcName(?,?)}"
conn.prepareCall(query)
assuming a user can insert SQL clause in the variable query , can it be exploited via prepare call ?
String query = "{? = call UserSuppliedStoredProcName(?,?)} or select * from login_table"
String query = "{? = call UserSuppliedStoredProcName(?,?)} AND select * from login_table"
String query = "{select * from login_table UNION ? = call UserSuppliedStoredProcName(?,?)}"
String query = "{sleep(1) or ? = call UserSuppliedStoredProcName(?,?)}"