CISA · Question #13
What is the BEST control to address SQL injection vulnerabilities?
The correct answer is B. Input validation. The best control to address SQL injection vulnerabilities is input validation, specifically using parameterized queries or prepared statements. This prevents malicious data from being executed as part of a database query.
Question
What is the BEST control to address SQL injection vulnerabilities?
Options
- ADigital signatures
- BInput validation
- CUnicode translation
- DSecure Sockets Layer (SSL) encryption
How the community answered
(22 responses)- B86% (19)
- C9% (2)
- D5% (1)
Why each option
The best control to address SQL injection vulnerabilities is input validation, specifically using parameterized queries or prepared statements. This prevents malicious data from being executed as part of a database query.
Digital signatures ensure data integrity and authenticity but do not prevent malicious input from being processed by an application susceptible to SQL injection.
Input validation, especially through the use of parameterized queries or prepared statements, is the most effective defense against SQL injection. This technique ensures that user-supplied data is strictly treated as data and not as executable code, thereby preventing attackers from injecting malicious SQL commands that could manipulate or expose database content.
Unicode translation deals with character encoding, which is unrelated to preventing SQL injection vulnerabilities where malicious code is embedded within user input.
Secure Sockets Layer (SSL) encryption protects data in transit between the client and server, but it does not prevent SQL injection attacks that exploit vulnerabilities in the server-side application's handling of input.
Concept tested: SQL injection prevention
Source: https://learn.microsoft.com/en-us/previous-versions/aspnet/ms178125(v=vs.100)
Topics
Community Discussion
No community discussion yet for this question.