Cyber Risks · PortSwigger Research

Lab: Reflected XSS with AngularJS sandbox escape and CSP

Summary: This PortSwigger lab requires a cross-site scripting attack that bypasses CSP, escapes the AngularJS sandbox, and alerts document.cookie. The exploit uses the ng-focus event to trigger a focus event that bypasses CSP, then abuses the $event.path array and the orderBy filter to call alert in the scope of the window without an explicit window reference.

What's compelling: AngularJS's window check and a CSP header are two separate defenses, and this lab shows both falling to a single payload built from the framework's own event and filter mechanics.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related