Skip to content

LAB 11 - DOM XSS in AngularJS expression with angle brackets and double quotes HTML-encoded

Initial instructions

This lab contains a DOM-based cross-site scripting vulnerability in a AngularJS expression within the search functionality.

To solve this lab, perform a cross-site scripting attack that executes an AngularJS expression and calls the alert function.

To complete this lab I used the following XSS payload.

{{$eval.constructor('alert(1)')()}}

I get the XSS payload from the following website:

XSS in Angular and AngularJS

So I entered this payload into the search bar and clicked Search.

alt text

And then it triggered the XSS payload.

alt text

Congratulations, you solved the lab!