CompTIA Study Materials
AWS Study Materials
AWS Certified Developer Associate AWS Certified Developer Associate
AWS Certified Developer Associate DVA-C02
AWS Certified Solutions Architect Associate AWS Certified Solutions Architect Associate
AWS Certified Solutions Architect Associate SAA-C03
AWS Cloud Practitioner AWS Cloud Practitioner
AWS Cloud Practitioner CLF-C02
Microsoft Study Materials
Microsoft Azure Fundamentals Microsoft Azure Fundamentals
Microsoft Azure Fundamentals AZ-900

Free CompTIA CySA+ CS0-003 Practice Question

During a routine security review of a web application, analysts discover a vulnerability that allows attackers to inject harmful scripts into comment fields, which are then stored and executed on other users' browsers when the comments are displayed. What is the BEST mitigation strategy to address this specific security issue?

  • Use a Content Security Policy (CSP) to prevent the execution of unauthorized scripts.

  • Install a Web Application Firewall (WAF) with default XSS protection settings.

  • Enforce output encoding for all user-generated content displayed on the web application.

  • Rely solely on input validation for all user-generated content to prevent malicious input.

This question's topic:
CompTIA CySA+ CS0-003 / 
Vulnerability Management
Your Score:
Vulnerability Management
Security Operations
Incident Response and Management
Reporting and Communication