Cyber Risks · PortSwigger Research

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