0

During a third party website audit, I found that the User-Agent header is vulnerable to time based SQLi. Can anyone suggest me how to patch this vulnerability?

1
  • 3
    Is that different from any other SQL injection? Parameterized queries or escaping, no? Commented Dec 14, 2016 at 5:17

1 Answer 1

2

A time-based SQL injection is not different from an ordinary SQL injection and neither is fixing it. They vary in how hard they are to attack but the defense remains pretty much the same. It also should not be relevant for the fixing method in which component you found it.

That's because the clean way to deal with SQL injections is almost always using parametrized queries (prepared statements). If you are auditing the source code, it would be best if instead of just flagging the SQL queries that you think are exploitable, you would rewrite all raw SQL queries to proper prepared statements. That makes the next audit much easier and you don't have to spend time thinking about escaping patterns and evasion techniques.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .