Emails from Grammarly missing sanitization(lack of validation?) -> HTML injection in emails
Grammarly's password reset emails did not sanitise the email address field, allowing HTML tags to be injected into the email body. An attacker could use this to spoof content in the reset email, though the impact was limited to content spoofing.
- Disclosed after 8 months
Summary: Emails from Grammarly (e.g. "reset password" email) missing HTML sanitization. That leads to content spoofing in emails.
Steps To Reproduce:
- Go to "Profile"
- Find reset password tab (if you're logged in using FB/Google, you won't see this menu)
- Change email to something like:
[email protected]->user+<h1>[email protected] - Find the letter from Grammarly in your inbox, about password reset attempt.
<h1>tag is noticeable.
Impact
Currently, the impact is miserable - content spoofing in "reset password" emails (sounds like a joke). However, it's still a bad behavior. I guess that HTML injection through unsanitized/unvalidated input could affect other Grammarly's email templates.
Attachments
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the email address input was not sanitised or validated before being inserted into the HTML body of the reset email template.
Impact
The impact was limited to content spoofing in password reset emails, though the researcher suggested it could affect other email templates.
What the attacker needed
A Grammarly account not using Facebook/Google login
How it was found
- Go to the profile page.
- Find the reset password tab (not visible if logged in via Facebook or Google).
- Change the email address to include an HTML heading tag.
- Open the password reset email from Grammarly in the inbox.
- Observe the HTML heading tag rendered in the email.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you sign up, a website stores your email address and later uses it to send you messages, like a password reset link. If the site does not clean up special characters in that address before putting it into the email, an attacker can add HTML code that changes how the email looks. Here, the researcher added a heading tag to their own email address and saw it appear as a large heading in the reset email.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.