Skip to content
IDOR Write-up Beginner

QR Code IDOR Vulnerability in Razorpay

An API endpoint returned customer payment details when given a QR code identifier, without checking that the requester was authorised to view that QR code's payments. An attacker who obtained a valid identifier from public QR codes or archived dashboard pages could retrieve UPI IDs, contact details and transaction history.

medium.com

Published on medium.com

This post is about an IDOR (Insecure Direct Object Reference) vulnerability I discovered in Razorpay’s QR-code payment system, which I reported through HackerOne. The goal of this write-up is to share my journey, document the finding, and hear from the security community on whether the classification fits.

Narayanan M, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the endpoint authorised requests by treating the QR code identifier as a secret rather than checking that the caller owned or was permitted to view that QR code.

Impact

An attacker with a valid QR code identifier could read customers' UPI IDs, email addresses, contact numbers and transaction history; the report notes the endpoint was later changed to return an error.

What the attacker needed

A valid QR code identifier; identifier found via public QR codes or archives

The fix

The endpoint was fixed so that it now returns an error instead of payment data.

How it was found

  1. Obtain a QR code identifier from publicly shared QR codes or archived Razorpay dashboard pages.
  2. Send a GET request to the QR code payments endpoint with that identifier.
  3. Read the JSON response containing multiple customers' payment details.

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 write-up has not been written yet. The Original tab links to the source.

A QR code payment identifier is like a reference number for a merchant's payment page. The website accepted that reference number and showed all the payments made through it, but it never checked whether the person asking was the merchant who owned it. Because QR codes are shared publicly, anyone who found the reference number could see other people's payment details.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.