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.
Use a Content Security Policy (CSP).
Conduct regular security audits.
Update the application's software dependencies.