SQL Injection (SQLi)
A flaw that lets an attacker tamper with the database queries an application sends, via crafted input.
What it is
SQL Injection occurs when user input is inserted directly into a database query instead of being safely separated from it, letting an attacker change what the query does. This can allow reading, altering, or deleting data the attacker should never touch, and sometimes taking over the database entirely. It is one of the oldest and most damaging web flaws.
Why it matters
A successful SQL injection can expose or destroy an entire database, including customer records and credentials, making it among the most serious web vulnerabilities.
How to fix it
Use parameterized queries (prepared statements) so input is always treated as data, apply least-privilege database accounts, and validate input.