nerdexam
CompTIA

CS0-003 · Question #469

An XSS vulnerability was reported on one of the public websites of a company. The security department confirmed the finding and needs to provide a recommendation to the application owner. Which of…

The correct answer is D. Implement a compensating control in the source code. F. Fix the vulnerability using a virtual patch at the WAF. To effectively prevent Cross-Site Scripting (XSS) attacks, implementing appropriate security controls within the application code and at the network layer is critical. Implementing security controls at the code level is an effective way to mitigate XSS risks. This can involve…

Submitted by carlos_mx· Mar 6, 2026Vulnerability management

Question

An XSS vulnerability was reported on one of the public websites of a company. The security department confirmed the finding and needs to provide a recommendation to the application owner. Which of the following recommendations will best prevent this vulnerability from being exploited? (Choose two.)

Options

  • AImplement an IPS in front of the web server.
  • BEnable MFA on the website.
  • CTake the website offline until it is patched.
  • DImplement a compensating control in the source code.
  • EConfigure TLS v1.3 on the website.
  • FFix the vulnerability using a virtual patch at the WAF.

How the community answered

(45 responses)
  • A
    9% (4)
  • C
    2% (1)
  • D
    84% (38)
  • E
    4% (2)

Explanation

To effectively prevent Cross-Site Scripting (XSS) attacks, implementing appropriate security controls within the application code and at the network layer is critical. Implementing security controls at the code level is an effective way to mitigate XSS risks. This can involve proper input validation, output encoding, and utilizing libraries that sanitize user inputs. By addressing the root cause in the source code, developers prevent scripts from being injected or executed in the browser. Web Application Firewalls (WAFs) can mitigate XSS vulnerabilities by identifying and blocking malicious payloads. Virtual patching at the WAF level provides a temporary fix by preventing exploit attempts from reaching the application, giving developers time to implement a permanent fix in the source code.

Topics

#XSS#web application security#vulnerability remediation#WAF#secure coding

Community Discussion

No community discussion yet for this question.

Full CS0-003 Practice