#0901
Your application renders user-submitted comments in an HTML page by interpolating username and comment directly into a template.
Neither field is HTML-escaped, allowing attackers to inject arbitrary HTML and JavaScript.
A stored XSS attack in a comment field can steal session cookies from every user who views the page.
Stored XSS in comment fields is one of the most common web vulnerabilities. It can lead to session hijacking, credential theft, and drive-by malware delivery.
renderComment('alice', '<script>alert(1)</script>')// html contains raw <script> tag — XSS!
renderComment('alice', '<script>alert(1)</script>')// html contains <script>alert(1)</script>