QuestionQ173

Vulnerability Discovery and Analysis

During a web application assessment, a penetration tester discovers an input field that permits JavaScript injection. The tester enters a line of JavaScript that triggers a prompt and displays a text box when the page is browsed to afterward. Which of the following attack types does this illustrate?

  • A SQL injection
  • B SSRF
  • C XSS
  • D Server-side template injection
Explanation

Cross-site scripting (XSS) occurs when attacker-controlled JavaScript is injected into a web application and executes in a user's browser. JavaScript that remains associated with a page and triggers a prompt on subsequent visits is characteristic of stored XSS.

Community Discussion

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