I'm looking at some old PHP code, trying to figure out if it's vulnerable to SQL injection. My boss believes it's safe, but I'm hesitant to accept that. It's using an Oracle DB.
It's old code, and the query is being built via string concatenation (sprintf). However, the user input string has all hyphens and spaces removed (via str_replace), and addslashes() is called on it. Is there still any threat of an attack in this case? Can you give an example?
Since the code was written we have moved to using parametrized queries, so ideally we update it to that, but I'm trying to prove the need to do so.