Web & Application Security
What Is SQL Injection? Safely Treating User Input as Query Data
SQL injection happens when an application joins an untrusted value into SQL text so the database interprets it as SQL syntax instead of data. The central defense is to keep query structure separate from values and pass values through the database driver's parameter binding. Input validation, ORMs, stored procedures, and hidden error messages can help, but none replaces this rule.