CAS-002 · Question #576
A web administrator develops a web form for users to respond to the company via a web page. Which of the following should be practiced to avoid a security risk?
The correct answer is D. Input validation. Input validation is the security practice that should be implemented on web forms to prevent attackers from injecting malicious data that could lead to SQL injection, XSS, or other attacks.
Question
A web administrator develops a web form for users to respond to the company via a web page. Which of the following should be practiced to avoid a security risk?
Options
- ASQL injection
- BXSS scripting
- CClick jacking
- DInput validation
How the community answered
(24 responses)- B4% (1)
- C8% (2)
- D88% (21)
Why each option
Input validation is the security practice that should be implemented on web forms to prevent attackers from injecting malicious data that could lead to SQL injection, XSS, or other attacks.
SQL injection is an attack technique and vulnerability class, not a security practice - it describes what the developer should protect against, not what should be implemented.
XSS (cross-site scripting) is also an attack category and vulnerability, not a defensive practice that can be implemented on a web form.
Clickjacking is a UI redress attack technique, not a security control or practice that a web form developer would implement.
Input validation ensures that data submitted through web forms is checked for type, length, format, and range before being processed or stored. By sanitizing and validating all user-supplied input, the developer removes the attack surface for injection-based vulnerabilities such as SQL injection and cross-site scripting at the source.
Concept tested: Input validation to prevent web application injection attacks
Source: https://owasp.org/www-project-proactive-controls/v3/en/c5-validate-inputs
Topics
Community Discussion
No community discussion yet for this question.