Mastering XSS in a single read!

Anonymous Traiger
5 min readDec 31, 2024

Cross-site scripting is a type of security vulnerability typically found in web applications. XSS attacks enable attackers to inject client-side scripts into web pages viewed by other users. A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same-origin policy.

How does XSS work?

Cross-site scripting works by manipulating a vulnerable website so that it returns malicious JavaScript to users. When the malicious code executes inside a victim’s browser, the attacker can fully compromise their interaction with the application.

Types of cross-site scripting

  • Reflected XSS
  • Stored XSS
  • DOM-based XSS

Reflected XSS

Reflected XSS is also popular as non-persistent XSS, which arises when user input is instantly returned by a web application in an error message/search result or the input provided by the user as part of the request and without permanently storing the user-provided data.
This is the least impactful category of XSS because exploiting the vulnerability involves crafting a request containing embedded JavaScript that is reflected by any user who makes the request. You can practice below we provide a lab link.

--

--

Responses (1)