Grok-Pedia

Cross-Site-Scripting

Cross-Site Scripting (XSS)

Cross-Site Scripting, commonly known as XSS, is a type of security vulnerability typically found in web applications. This vulnerability allows attackers to inject malicious scripts into websites viewed by other users. Here's an in-depth look at XSS:

History and Discovery

Types of XSS Attacks

  1. Stored XSS: The malicious script is permanently stored on the target server, such as in a database, message forum, or comment field. The script is then executed every time a user loads the affected page.
  2. Reflected XSS: This attack involves sending a malicious script to a user via a link, which the user must click on. The script is then reflected back to the user's browser, often through a search or error message. It does not get stored on the server.
  3. DOM-based XSS: This type of XSS occurs when client-side scripts write data to the Document Object Model (DOM) in an unsafe way, allowing the execution of arbitrary JavaScript code. Unlike other types, the server does not directly participate in the attack.

Impact of XSS

Prevention and Mitigation

References

See Also

Recently Created Pages