QuestionQ94

VerifiedEnsuring data protection

You are part of your company's development team. You discovered that your web application, hosted in staging on GKE, dynamically includes user data in web pages without properly validating the supplied data first. This could let an attacker execute gibberish commands and show arbitrary content in a victim user's browser in a production environment.

How should you prevent and remediate this vulnerability?

Explanation

Untrusted user-supplied data rendered into a page can create an XSS vulnerability, allowing attacker-controlled script or content to run in a victim’s browser. Web Security Scanner can simulate XSS injection, and the recommended remediation is to escape output through a templating system that provides contextual auto-escaping.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!