Lab: Reflected XSS in canonical link tag
Summary: PortSwigger's lab reflects user input inside a canonical link tag while escaping angle brackets, so the intended solution injects an attribute that calls the alert function rather than a new tag. The exploit uses an access key set on the page, which triggers the alert when the simulated user presses the specified key combination, and PortSwigger notes the intended solution works only in Chrome.
Bottom line: Escaping angle brackets is not the same as neutralizing a canonical tag: an attacker who can add an attribute there can bind a page-wide access key that fires on a single keystroke, which is a real path to script execution in Chrome.
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