During a web application assessment, you identify that the application does not validate user input on a form field. Which of the following vulnerabilities is MOST likely to result?

  1. Insufficient Logging
  2. Broken Authentication
  3. Broken Access Control
  4. Cross-Site Scripting (XSS) ✓

Correct answer: Cross-Site Scripting (XSS)

Option D is correct because a lack of input validation on a form field is the classic root cause of Cross-Site Scripting (XSS), where an attacker injects malicious client-side script content that is later rendered in other users' browsers, hijacking sessions or stealing credentials. Option A, Insufficient Logging, is a monitoring and detection failure that does not arise directly from missing input validation on a form field. Option B, Broken Authentication, relates to weaknesses in session management, credential storage, or login mechanisms, not to unvalidated form input by itself. Option C, Broken Access Control, involves failures to enforce authorization rules on resources or actions, which is a separate concern from whether user-supplied data is sanitized before being reflected or stored.

Topic: · xss, input validation, web application security, owasp

Practice CompTIA PenTest+ (PT0-002) Questions Free