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
- 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