Lab: Reflected XSS into a Java Script string with angle brackets and double quotes HTML-encoded and single quotes escaped
Summary: PortSwigger's lab contains a reflected cross-site scripting vulnerability in the search query tracking functionality, where angle brackets and double quotes are HTML-encoded and single quotes are escaped. Solving it requires a payload that breaks out of the JavaScript string and calls the alert function.
What you should know: The lab shows that HTML-encoding angle brackets and double quotes while only escaping single quotes still leaves a JavaScript string context breakable, so input filters that cover some characters but not the surrounding context can still let an attacker inject script.
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