CompTIA CySA+ (CS0-003) — Question 252

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.)

Answer options

Correct answer: D, F

Explanation

The correct answers, D and F, involve making changes directly to the source code and applying a virtual patch at the Web Application Firewall (WAF) to mitigate the XSS vulnerability effectively. Options A, B, C, and E do not directly address the XSS vulnerability itself; an IPS and MFA improve security but do not fix the underlying issue, taking the website offline is not a practical long-term solution, and configuring TLS v1.3 enhances security but is unrelated to XSS.