Mattermost 6.3.0 and earlier fails to properly sanitize the HTML content in the email invitation sent to guest users, which allows registered users with special permissions to invite guest users to inject unescaped HTML content in the email invitations.
Credits
Thanks to Imamul Mursalin for contributing to this improvement under the Mattermost responsible disclosure policy.