How i was able to bypass strong xss protection in well known website. (imgur.com)

Armaan Pathan
Jul 21, 2017 · 2 min read

after finishing my final exams i have decided to give a dedicated time to bug bounty, not to EARN but to LEARN, so i had selected my target.

so i selected my domain which was imgur.com.

as soon as i selected the target i started browsing the website & at there i found that there is a option

ALBUM DESCRIPTION

Image for post

i decide to find that album description is vulnerable to Cross site scripting vulnerability or not.

so first i entered “/><script>alert(1);</script> and i noticed that it had removed the <script> tags from the album description at it was displaying alert(1); without any pop-up.

Then I decided to use event handler payload to check that i am getting the pop-up or not. so i tried “/><svg/onload=prompt(1);> & and now i had noticed that it has removed the onload tag from album description and it was only displaying <svg/prompt(1);> tag.

So here i had noticed the behavior of the application that it is stripping out the <script> tags and also stripping out the event handlers.

Then after I finally decided to use both <script> tag and event handlers to bypass the xss protection so i used ”/><svg/on<script>load=prompt(document.domain);>”/><svg/on<script>load=prompt(document.cookie);>

AND

Image for post
Image for post

i had bypassed the XSS protection over there and was able to store the malicious scripts.

and after reported it was patched & rewarded with sweet bounty :)

Image for post

InfoSec Write-ups

A collection of write-ups from the best hackers in the…

Armaan Pathan

Written by

InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. In a nutshell, we are the largest InfoSec publication on Medium. Maintained by Hackrew

Armaan Pathan

Written by

InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. In a nutshell, we are the largest InfoSec publication on Medium. Maintained by Hackrew

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store