Skip to content
XSS Disclosed report Beginner

Reflected Cross-Site scripting in : mtn.bj

A reflected cross-site scripting flaw existed in the file upload filename field on mtn.bj. An attacker could inject a script via a crafted filename so that it executes in a victim's browser and accesses cookies or session tokens.

alimanshester Follow

Originally disclosed on HackerOne

  • Triaged in 37 days
  • Fixed in 42 days
  • Disclosed after 2 months

Summary by the researcher

Writeup : ██████████

The report

Hello Team I have found a Reflected XSS vulnerability in mtn.jb by file name

Steps To Reproduce:

[add details for how we can reproduce the issue]

  1. go to :

████ 2. enter any email and press Suivant 3. fill all the inputs by any data . 4. in file upload upload any photo with payload file name : "><img src=x onerror=alert(document.cookie);.jpg

5 . the payload executed in the page

Supporting Material/References: 1 - video showing poc 2 - screenshot

Impact

An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s browser has no way to know that the script should not be trusted, and will execute the script. Because it thinks the script came from a trusted source, the malicious script can access any cookies, session tokens, or other sensitive information retained by the browser and used with that site. These scripts can even rewrite the content of the HTML page

The original report as published on HackerOne, by alimanshester. 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 reflected the uploaded file's name into the page without encoding it, so HTML and script in the name were treated as markup.

Impact

An attacker could run a script in an unsuspecting user's browser that reads cookies, session tokens and other sensitive data, and could rewrite the page content.

What the attacker needed

Victim visits the crafted page or link; attacker can upload a file with a crafted name

How it was found

  1. Open the sign-up page on the site.
  2. Enter any email address and press the continue button.
  3. Fill in the remaining form fields with arbitrary data.
  4. Upload a photo whose filename contains an HTML image tag with an error handler.
  5. Observe the script executing on the page.

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.

Cross-site scripting (XSS) is when a website displays user-supplied text as if it were part of the page's code, so a script hidden in that text runs in the visitor's browser. Here the name of an uploaded photo was shown back on the page without being made safe, so a name containing a script tag ran. That script could then read the visitor's cookies, which are small pieces of data the site uses to remember who is logged in.

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 alimanshester

View all

1 more disclosed report, best first.

More from MTN Group

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.