XSS - Hard
Category: Web
Description
The admin has tried even harder to block JS on the blog.
Can you get the flag from the admin user? He's logged on right now
Write-up
- Continuing from the XSS - EasyandXSS - Mediumchallenges, we are no longer able to create comments with<script>tags as they get sanitized.
- However, we can still invoke JavaScript logic through the <img>tag'sonerrorevent handler.
- Our payload should contain an <img>tag that points to an invalid URL, triggering theonerrorevent and invoking our malicious logic from theXSS - Mediumchallenge.
- An example of the payload is:
Text Only 
- After submitting our payload, we can refresh the page and view the flag in one of the blog post's comments.
Flag: punk_{RGQXJ27QYW15L7TJ}