Java Script injection (stored DOM-based)
Summary: Stored DOM-based JavaScript injection occurs when user input is stored and later embedded into a response within a part of the DOM that a client-side script processes unsafely, letting an attacker control data such as a JavaScript string that the script then executes as code. An attacker can construct a URL that, when visited by another user, runs attacker-supplied JavaScript in that user's browser within their session, enabling actions such as stealing session tokens or login credentials, performing arbitrary actions on the victim's behalf, and logging keystrokes.
Bottom line: The payload is stored rather than reflected, so a single crafted URL can execute code inside another user's authenticated session and expose their session token or credentials. PortSwigger notes that static analysis alone can produce false positives, so a scanner finding without dynamic evidence still requires code and execution-path review to confirm exploitability.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026