Cyber Risks · PortSwigger Research

Lab: Reflected XSS into a Java Script string with angle brackets HTML encoded

Summary: PortSwigger's lab presents a reflected cross-site scripting vulnerability in search query tracking functionality, where angle brackets are encoded but the reflection lands inside a JavaScript string. Solving it requires breaking out of that JavaScript string and calling the alert function.

Key Takeaway: Encoding angle brackets is a common filter, and this lab shows it does not protect a value reflected into a JavaScript string - the context, not the character blocklist, decides whether injection is possible.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related