Certified Ethical Hacker (CEH v10) — Question 122
Which of the following is one of the most effective ways to prevent Cross-site Scripting (XSS) flaws in software applications?
Answer options
- A. Use security policies and procedures to define and implement proper security settings.
- B. Use digital certificates to authenticate a server prior to sending data.
- C. Validate and escape all information sent to a server.
- D. Verify access right before allowing access to protected information and UI controls.
Correct answer: C
Explanation
The correct answer, C, emphasizes the importance of validating and escaping all user input to prevent XSS attacks. Options A, B, and D, while important for other security aspects, do not specifically address the prevention of XSS vulnerabilities.