Threats, Vulnerabilities, and Attacks

A comment field on a forum stores user input unfiltered. Any visitor who views the page runs the attacker's script in their own session. What attack is this?

Show the answer

Correct answerC. Stored cross-site scripting

AWhy not this: CSRF makes a browser send an unwanted request using existing credentials; it does not inject script into the page.

BWhy not this: Session fixation forces a known session ID on a victim; it does not execute injected JavaScript.

CWhy this is right: The script is saved on the server and delivered to every visitor, which defines stored XSS.

DWhy not this: Reflected XSS bounces script from a crafted request in a link; nothing is stored on the site.

Stored cross-site scripting saves malicious JavaScript on the server, so it runs for every visitor who loads the page. Reflected XSS needs the victim to follow a crafted link, because the script is not saved on the site.