Skip to content
XSS Disclosed report Intermediate

Reflected XSS on /zuora_callback/payment_method endpoint

The errorMessage parameter on the zuora_callback/payment_method endpoint was not properly sanitised, allowing reflected cross-site scripting. An attacker could execute arbitrary JavaScript in a victim's browser on customers.gitlab.com, potentially leading to account takeover by changing the victim's email address.

GitLab

Originally disclosed on GitLab

  • Fixed in 5 days
  • Disclosed after 5 days

HackerOne report #1290342 by yashrs on 2021-08-04, assigned to @rshambhuni:

Report | Attachments | How To Reproduce

Report

Hi,

Summary

The parameter errorMessage is not sanitized properly on the endpoint https://customers.gitlab.com/zuora_callback/payment_method endpoint.

The only challenge we have as an attacker is that there is a signature as well on this endpoint which gets invalidated in some time, so the attacker can write some script to reproduce this as well. The root cause of the issue can be seen in this screenshot. The signature works across accounts as well so it's not an issue to exploit the XSS.

Screenshot_2021-08-04_at_9.38.30_PM.png
Screenshot_2021-08-04_at_9.38.30_PM.png From the original on GitLab
Screenshot_2021-08-04_at_9.41.19_PM.png
Screenshot_2021-08-04_at_9.41.19_PM.png
Steps to reproduce

Easy PoC:

Normal PoC:

  • Login to customers.gitlab.com
  • Go to https://customers.gitlab.com/subscriptions/new?plan_id=2c92a0086a07f4a8016a2c0a1f7b4b4c&transaction=ci_minutes
  • Enter 1 quantity, and any test credit card details, and random expiry, and CVV, and cardholder name.
  • Click on Buy CI minutes.
  • Observe that an HTTP request is made to https://www.zuora.com/apps/PublicHostedPageLite.do and then to https://customers.gitlab.com/zuora_callback/payment_method?. Send the second request to the Repeater tab. Modify errorMessage parameter to contain "-alert(document.domain)-", and then right-click and copy URL. Open in browser. You can also open the same link in another GitLab account.
Screenshot_2021-08-04_at_9.41.19_PM.png
Screenshot_2021-08-04_at_9.41.19_PM.png From the original on GitLab
Impact

Cross-site scripting on customers.gitlab.com. Actions can be taken on behalf of the victim. Account takeover is possible because changing the email ID doesn't require the current password! So the attacker can write an XSS payload that changes the victim's email id in their account.

Screenshot_2021-08-04_at_9.47.48_PM.png
Screenshot_2021-08-04_at_9.47.48_PM.png From the original on GitLab
Examples

N/A

What is the current bug behavior?

N/A

What is the expected correct behavior?

Sanitization of strings

Relevant logs and/or screenshots

N/A

Output of checks

N/A

Results of GitLab environment info

N/A

Video PoC:

Screen_Recording_2021-08-04_at_9.50.10_PM.mov From the original on GitLab

Regards,
Yash

Impact

As described above, an account takeover is possible in this scenario.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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 errorMessage parameter into the HTML response without proper output encoding or sanitisation.

Impact

An attacker could execute JavaScript in a victim's browser on customers.gitlab.com, and because changing the email address did not require the current password, account takeover was possible.

What the attacker needed

Victim opens a crafted link; attacker obtains a signature, which expires and must be…

The fix

The application should sanitise or properly encode the errorMessage parameter before reflecting it in the response.

How it was found

  1. Log in to customers.gitlab.com.
  2. Go to the subscriptions/new page with a specific plan and transaction parameter.
  3. Enter quantity, test credit card details, expiry, CVV, and cardholder name.
  4. Click on Buy CI minutes.
  5. Observe the HTTP request to zuora.com and then to customers.gitlab.com/zuora_callback/payment_method.
  6. Send the second request to Repeater, modify the errorMessage parameter to contain a script payload, copy the URL, and open it in a browser.

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 a flaw where a website inserts user-supplied text into its pages without cleaning it, so an attacker can make the site run their own JavaScript. Here, a parameter called errorMessage was reflected back into the page, letting an attacker run code in a victim's browser. Because the site allowed changing the email address without the current password, that code could take over the account.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from GitLab

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.