Skip to content
XSS Disclosed report Intermediate

Second Order XSS via █████

A chat message containing HTML was not sanitised before being included in a notification email, so an attacker could inject a base tag that redirected links in the email to a domain they control. A victim could then be tricked into visiting a malicious site, and if reading email in a browser, malicious code could run in their browser.

z32 Follow

Originally disclosed on HackerOne

  • Triaged in 10 hours
  • Fixed in 11 months
  • Disclosed after 11 months

Summary: A malicious user can use HTML injection to send a malicious chat message to an unsuspecting user, leading to a second order HTML injection/XSS via e-mail.

Description: This will send an e-mail to the user that they have received a new message, and the malicious message will be sent to the user without first being sanitized. This allows the malicious user to inject HTML via the e-mail sent from an official █████████ mail server.

Impact

Users can be tricked into visiting a malicious website based on an e-mail they receive from the Air University Service Desk. Additionally, if a user is checking their e-mail from a web browser, malicious code could execute within the victim's browser on behalf of the attacker.

Step-by-step Reproduction Instructions

  1. Create an account on ████████ and browse to ██████.

███ 2. Create a new conversation and send a malicious message containing HTML to another account. This is unfiltered and allows many possibilities, but for this example I used the payload <base href=//un4.gi>. This will change any links in the e-mail to route to the domain un4.gi/path/to/original/file.

██████████ 3. Check your e-mail address from your secondary test account. You should have an e-mail stating that you have a new message. Note that in the image above, the bottom left corner shows that the link that states You have a new message from unagi unagi leads to https://un4.gi/███████sysparm_channelID=████.

█████ 4. An attacker can exploit this by hosting a malicious file at the path ██████sysparm_channelID=<channelIDhere>. The channelID can be prepared ahead of time, as it is in the URL in the window they originally send the message from. Once visited by the user, the attacker would have endless possibilities.

Suggested Mitigation/Remediation Actions

Sanitize e-mail messages to prevent them from containing any user generated HTML or Javascript.

Impact

Users can be tricked into visiting a malicious website based on an e-mail they receive from the Air University Service Desk. Additionally, if a user is checking their e-mail from a web browser, malicious code could execute within the victim's browser on behalf of the attacker.

The original report as published on HackerOne, by z32. 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 application inserted user-supplied chat message content into notification emails without sanitising or encoding it, allowing HTML injection.

Impact

Users could be tricked into visiting a malicious website via an email from the official service desk, and if checking email in a web browser, malicious code could execute in the victim's browser.

What the attacker needed

An account; victim receives notification email; victim clicks a link in the email

The fix

Email notifications should be sanitised so they cannot contain user-generated HTML or JavaScript.

How it was found

  1. Create an account and browse to the chat area.
  2. Create a new conversation and send a message containing HTML to another account.
  3. Check the recipient's email inbox for the new-message notification.
  4. Observe that links in the email now point to the attacker's domain.

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 send a chat message, the service also emails the recipient to say they have a new message. The report found that the message text was placed into that email without cleaning it first, so someone could include special web code (HTML) that changes where links in the email point. The recipient might then click a link expecting one site but land on another, which the attacker controls.

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 z32

View all

18 more disclosed reports, best first.

More from U.S. Dept Of Defense

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.