This is kind of a dumb bug, but interesting none the less. It was found by Yoni Ramon and myself while testing for vulnerabilities in a CMS at the beginning of 2014. While the particular injection point on the CMS was not vulnerable, we noticed it was sending HTML in emails directly to users. HTML in emails is not really a vulnerability, however this we discovered a JS-filtering bypass that allowed us to inject JS into the client.
The short version is (long version in email below):
- JS is ignored in emails
- In the case that a user receives two emails, a thread is created
- The preview pain of the thread appears to render HTML
- The tag embedded into itself successfully bypass the JS filter