Skip to content
XSS Disclosed report Beginner

Persistent input validation mail encoding vulnerability in the "just followed you" email notification.

The 'your full name' field in a user's profile was not filtered when edited, allowing an attacker to inject HTML/JavaScript. This payload was then included in the 'just followed you' email notification sent to other users, potentially exposing their cookies.

pr0tagon1st Follow

Originally disclosed on HackerOne

  • Fixed in 6 days
  • Disclosed after 2 months

This vulnerability allows an attacker to add custom html/js code to emails that are then sent to other users of zomato.com.

This vulnerability can be reproduced by any normal user (ie. unprivileged accounts) by editing their profile's "your full name" field with malicious code. This is not possible during registration as that input is filtered, however, it is possible when editing the user profile as no filtering of the "your full name" field is done at that point.

This vulnerability could be used to inject an img or iframe with an external js source that could expose a user's cookie information.

These are the steps to reproduce it:

  1. Register and verify an account with zomato.com
  2. Browse to the "edit user profile" page as a logged in user.
  3. Inject the desired html/js payload into the "Your full name" field.
  4. Save your profile.
  5. Browse to another user's profile.
  6. Click the "Follow" button.
  7. Other user will receive a "<payload> has just followed you!" email within a few minutes that contains the html/js payload in the subject and body.

I have used these payloads to confirm the vulnerability:

"><"{{media:0}}%20%20> "<iframe src=a>%20<iframe>
{{media:1}}%20%20> "<iframe Src=a>%20<iframe>

And this is part of an email message I received that contains one of the payloads:

      <span style="color: white; font-size: 22px; line-height: 24px; display:block;"><a href="https://www.zomato.com/users/ltimg-srcquothttpgoogljpx2svquot-onloadalertquotpentestquotgt2020gt-quotltiframe-srcagt20ltiframegt-33442340?ref=email_follow_back_follower_link_1" style="text-decoration: none;color: white;">
<strong>{{media:2}}%20%20> "<iframe Src=a>%20<iframe> </strong>
</a> just followed you.</span>

Which shows the unfiltered payload a victim would receive.

The accounts I have used for this test all use the email *@mattscodecave.com.

The original report as published on HackerOne, by pr0tagon1st. 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 failed to sanitise user input in the 'your full name' field when editing a profile, and later embedded that unsanitised input directly into email notifications.

Impact

An attacker could inject HTML/JavaScript into emails sent to other users, potentially exposing their cookie information.

What the attacker needed

A free account; victim receives email

How it was found

  1. Register and verify an account.
  2. Go to the edit profile page while logged in.
  3. Enter HTML/JavaScript payload into the full name field.
  4. Save the profile.
  5. Visit another user's profile and click Follow.
  6. The other user receives an email containing the payload.

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 edit your profile name on a website, the site should clean up any code you type. Here, it didn't, so an attacker could put harmful code in their name. That code then appeared in emails sent to other users, which could steal their login information.

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 pr0tagon1st

View all

2 more disclosed reports, best first.

More from Eternal

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.