A web application has been identified as being susceptible to SQL injection attacks. Which control would be the MOST effective to mitigate this vulnerability?
Parameterized queries are the most effective control for preventing SQL injection attacks because they ensure that SQL code and data are sent to the database separately. This approach prevents attackers from manipulating the SQL code. While input validation is also essential, it is more general and may not be sufficient on its own to stop SQL injection specifically. Web application firewalls (WAFs) add another layer of protection but should not replace secure coding practices. Encryption, though important for protecting data at rest and in transit, does not directly address SQL injection vulnerabilities.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What exactly are parameterized queries and how do they prevent SQL injection?
Open an interactive chat with Bash
How does input validation differ from parameterized queries in preventing SQL injection?
Open an interactive chat with Bash
When is it appropriate to use a Web Application Firewall (WAF) to complement SQL injection defenses?