You are performing a vulnerability assessment and identify several instances of cross-site scripting (XSS) on your company's web applications. Which of the following measures is the MOST effective in mitigating this vulnerability?
Implement input validation and output encoding.
Update the application's software dependencies.
Conduct regular security audits.
Use a Content Security Policy (CSP).