SQL Injection
Description: SQL Injection occurs when malicious SQL code is inserted into an input field, potentially compromising the backend database. Attackers can manipulate SQL queries to gain unauthorized access to sensitive data.
Impact: Data loss, unauthorized access to sensitive information, and potential compromise of the entire database.
Example: An attacker can input the following payload in a login form: ' OR 1=1 --
, which bypasses authentication and gives access to the application.
Prevention: Use prepared statements and parameterized queries, validate and sanitize user inputs, and implement Web Application Firewalls (WAF).