HTML Injection in Email Invitations: A Security Flaw Exploited
The family account invitation system failed to sanitise the invitee's name field, allowing HTML tags to be injected into the confirmation email. An attacker could send a legitimate-looking email containing a clickable button or form that redirects the recipient to a malicious site.
Published on medium.com
During a security assessment of Redacted.com’s family account invitation system, I discovered an HTML injection vulnerability in the email invitation process. This flaw allows an attacker to inject malicious HTML elements, such as buttons, links, and forms, into the confirmation email.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the email invitation system did not sanitise or encode the invitee's name before inserting it into the HTML body of the confirmation email, even though the web interface blocked HTML in the same field.
Impact
An attacker could send a legitimate-looking invitation email containing a fake button or form that redirects the recipient to a malicious site, potentially leading to phishing or credential theft.
What the attacker needed
A free account; victim receives the invitation email
How it was found
- Log in to the site with a test account.
- Try to set the first and last name to an HTML heading; the system blocks it.
- Go to the family account invitation page.
- Set the invitee's name to an HTML link containing a button.
- Send the invitation and open the confirmation email.
- Observe that the HTML renders as a clickable button that redirects to the attacker's site.
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 write-up has not been written yet. The Original tab links to the source.
When you type your name into a form, the website should treat it as plain text, not as instructions for the browser. Here, the invitation email treated the name as HTML (the code that builds web pages), so an attacker could put a fake button or link in an email that looked like it came from the real company. Clicking that button could take the victim to a scam website.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.