nerdexam
CompTIA

PT0-003 · Question #14

During a web application assessment, a penetration tester identifies an input field that allows JavaScript injection. The tester inserts a line of JavaScript that results in a prompt, presenting a…

The correct answer is C. XSS. Cross-Site Scripting (XSS) is an attack that involves injecting malicious scripts into web pages viewed by other users. XSS (Cross-Site Scripting): This attack involves injecting JavaScript into a web application, which is then executed by the user's browser. The scenario…

Submitted by saadiq_pk· Mar 6, 2026Attacks and Exploits

Question

During a web application assessment, a penetration tester identifies an input field that allows JavaScript injection. The tester inserts a line of JavaScript that results in a prompt, presenting a text box when browsing to the page going forward. Which of the following types of attacks is this an example of?

Options

  • ASQL injection
  • BSSRF
  • CXSS
  • DServer-side template injection

How the community answered

(36 responses)
  • B
    3% (1)
  • C
    92% (33)
  • D
    6% (2)

Explanation

Cross-Site Scripting (XSS) is an attack that involves injecting malicious scripts into web pages viewed by other users. XSS (Cross-Site Scripting): This attack involves injecting JavaScript into a web application, which is then executed by the user's browser. The scenario describes injecting a JavaScript prompt, which is a typical XSS payload.

Topics

#web application security#JavaScript injection#XSS#client-side attacks

Community Discussion

No community discussion yet for this question.

Full PT0-003 Practice