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?

  • You selected this option

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

  • You selected this option

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

  • You selected this option

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

  • You selected this option

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

CompTIA CySA+ CS0-003
Vulnerability Management
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot