Last active
October 9, 2015 10:46
-
-
Save obenjiro/0b273a97a9ee55c39393 to your computer and use it in GitHub Desktop.
Always escape quotes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>XSS with quotes only</title> | |
| </head> | |
| <body> | |
| <span></span> | |
| <script> | |
| // this happens becouse we use raw value inside of attribute "title" | |
| var titleText = 'asd" onmouseover="alert(1)"'; | |
| document.getElementsByTagName('span')[0].innerHTML = '<div title="' + titleText + '">'+titleText+'</div>'; | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment