HTML Injection in email when deactivate a user
A user could set their account name to include HTML, and when that user was deactivated, the deactivation email included the unsanitised HTML in the name field. An attacker could inject HTML into the email, potentially spoofing content or executing scripts in the recipient's email client.
Originally disclosed on Bugcrowd
- Accepted in 10 days
- Fixed in 31 days
- Disclosed after 3 months
Summary by HubSpot
It was possible for a user to change their name to include HTML. When that user was deactivated, the deactivation email included the HTML in the user's name fields. The issue is fixed.
Summary by x_bugcrowd
Thanks! Can we disclose?!
Report details
-
Submitted
16 Apr 2022 03:42:42 UTC
-
Target Location
events.hubspot.com -
Target category
Other
-
VRT
Server-Side Injection > Content Spoofing > Email HTML Injection
-
Priority
P4
-
Bug URL
Empty
-
Description
Hello Gents,
- While testing
app-eu1.hubspot.com, I found out that users email could be injected with HTML tag via company name!
Steps to reproduce:
- Please login at https://app-eu1.hubspot.com.
- Navigate to https://app-eu1.hubspot.com/settings/PORTAL-ID/account-defaults/general.
- Inject Account name with HTML payload.
- Now navigate to https://app-eu1.hubspot.com/settings/PORTAL-ID/users.
- Choose your victim and Deactivate.
- Check victim email, HTML will be executed.
Proof of concept:
- POC video in { Attachments }
Thanks and have a nice day!
- While testing
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 application failed to sanitise or encode user-controlled input (the account name) before embedding it into the HTML body of a deactivation email.
Impact
An attacker could inject HTML into the deactivation email, potentially spoofing content or executing scripts in the recipient's email client, though the actual impact depends on the email client's handling of HTML.
What the attacker needed
A user account; ability to set account name; ability to deactivate users
The fix
The issue was fixed by sanitising or encoding user-controlled input before including it in emails.
How it was found
- Log in to the application.
- Navigate to the account defaults general settings page.
- Inject an HTML payload into the Account name field.
- Navigate to the users management page.
- Select a victim user and deactivate them.
- Check the victim's email; the HTML is executed.
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, you can set a display name. The site didn't clean that name before putting it into an email sent to others. So someone could put HTML code in their name, and that code would appear in the email, possibly changing how the email looks or running scripts if the email client allows it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.