While looking into an application, i found an interesting piece of code that led to an interesting CSPT. And so i decided to share it as a mini Challenge.
To solve this you need to take control over the whole path and query params of the POST request.
You can run this code in your dev tools console on a website like
example.com (see 2nd screenshot for how a successful exploitation should look like)
I am interested in seeing how you guys would approach this, and hopefully learn new techniques.
PS: I have changed some small details in this snippet to keep the original code confidential.