Cyber Risks · PortSwigger Research

Cross-site scripting (DOM-based)

Summary: DOM-based cross-site scripting occurs when a client-side script reads data from a controllable part of the DOM, such as the URL, and writes it into the HTML document in an unsafe way. An attacker can then construct a URL that, when visited by another user, executes attacker-supplied JavaScript in that user's browser within the context of their session with the application.

What you should know: Code running in the victim's session can steal session tokens or login credentials, perform arbitrary actions on the victim's behalf, and log keystrokes - and PortSwigger notes that static analysis alone can flag false positives, so a scanner finding without dynamic evidence still needs code review to confirm exploitability.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related