Skip to content
XSS Advisory Beginner CVE-2023-30614

GHSL-2023-084: Cross-site scripting (XSS) in Pay - CVE-2023-30614

The Pay payments engine for Ruby on Rails had a reflected cross-site scripting vulnerability in its payment info page. An attacker could craft a URL with a malicious 'back' parameter that, when clicked, would execute JavaScript in the context of the logged-in user, potentially allowing actions on their behalf or data disclosure.

p Follow

Originally disclosed on GitHub Security Lab

Pay, a payments engine for Ruby on Rails, comes with a payment info page which was susceptible to Cross-site scripting. This allowed a remote attacker to execute JavaScript code in the context of the current user.

p-, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

Impact

This could lead to sensitive data disclosure and allow the attacker to perform actions on behalf of the logged-in user.

What the attacker needed

Valid Stripe Payment Intent ID; victim clicks the crafted link

The fix

The issue was fixed by the maintainer, as indicated by the published advisory.

How it was found

  1. Obtain a valid Stripe Payment Intent ID for the target site (can be from the attacker's own payment).
  2. Construct a URL to the payment page with a 'back' parameter containing a javascript: payload.
  3. Send the URL to the victim (e.g., via email or user-generated content).
  4. Victim visits the URL and sees a 'Go back' button pointing to the JavaScript link.
  5. Victim clicks the button, executing the JavaScript in the context of the site.

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 shows attacker-supplied code as if it were part of the site. Here, a link on a payment page could be made to run JavaScript when clicked, letting an attacker act as the logged-in user. The attacker needed a valid payment ID to make the link work.

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 p

View all

49 more disclosed reports, best first.

More from GitHub Security Lab

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.