MockReal Logo
Home
BlogPricing
For Employers β†’
  1. Home
  2. Questions
  3. What is XSS? What are the three types?

What is XSS? What are the three types?

TechnicalWeb Application Security TesterSecurity TesterPenetration TesterWeb Application Security Tester

XSS, or Cross-Site Scripting, is a security vulnerability that allows attackers to inject malicious scripts into web pages viewed by users. This typically occurs when a web application includes untrusted data in its output without proper validation or escaping. There are three main types of XSS: Stored XSS, Reflected XSS, and DOM-based XSS.

In Stored XSS, the malicious script is permanently stored on the target server, such as in a database, and is served to users when they access the affected page. In contrast, Reflected XSS occurs when the script is reflected off a web server, often through URL parameters, and executed immediately. Lastly, DOM-based XSS exploits the client-side scripts in the browser, manipulating the DOM to execute the attack.

For example, in a Stored XSS attack, an attacker might post a comment containing a script on a blog. When other users view that comment, their browsers execute the script, potentially stealing cookies or session tokens. Understanding these differences is crucial for implementing effective security measures, such as input validation and output encoding, to mitigate these vulnerabilities.

More Questions

  • What is a CSRF attack, and how can it be prevented?
  • How do you test for Blind SQL Injection?
  • What kind of methods are there in HTTP Requests?
  • According to the Open Source Security Testing Methodology Manual, what are the seven main types of security testing?
  • According to the Open Source Security Testing Methodology Manual, what are the seven main types of security testing?
  • As far as information security is concerned, why is web application security so important?
  • Before you run MobSF on an iOS application, you need to do what to prepare the ipa file?
  • Besides the other vital factors, which web application security testing option is the best?
  • Can security testing be automated?
  • Can you explain the difference in web cache poisoning and web cache deception?
MockReal Logo

Spoken interview practice for technical professionals

Product

  • Pricing
  • Questions
  • Positions
  • Resumes
  • For Employers β†’

Company

  • Careers
  • About Us
  • Contact
  • Blog

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

Β© 2025 MockReal. Spoken interview practice. All rights reserved.