A security team is reviewing the findings in a report that was delivered after a third party performed a penetration test. One of the findings indicated that a web application form field is vulnerable to cross-site scripting. Which of the following application security techniques should the security analyst recommend the developer implement to prevent this vulnerability?
Choose an answer
Tap an option to check your answer.
Correct answer: Input validation.
Why this is the answer
Input validation is crucial for preventing cross-site scripting (XSS) because it ensures that data entered into a web application form field conforms to expected formats and types, sanitizing or rejecting malicious input. This stops attackers from injecting client-side scripts into web pages viewed by other users. Secure cookies enhance cookie security but don't prevent XSS itself. Version control manages code changes but doesn't directly address application vulnerabilities. Code signing verifies the authenticity and integrity of software but is unrelated to preventing XSS in web forms.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed