Skip to content
IDOR Write-up Intermediate

The Ticket Hack: Free travel by hacking the Chennai Metro Rail.

The ticket booking system allowed a user to replace the encrypted fare response for a longer journey with one from a shorter, cheaper journey, resulting in a discounted ticket. An IDOR in the ticket history endpoint also let an attacker view and use other passengers' QR codes, potentially invalidating their tickets.

Manav Bankatwala Follow

Published on infosecwriteups.com

{{media:0}}

Manav Bankatwala, on infosecwriteups.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

Impact

An attacker could book tickets at a fraction of the normal price and view other passengers' QR codes, potentially using them before the rightful owner and invalidating the original ticket.

What the attacker needed

A free account on the ticket portal; ability to intercept and modify HTTP traffic; knowledge of ticket IDs

The fix

The vulnerabilities were fixed after being reported to the Chennai Metro Rail department.

How it was found

  1. Book a ticket for a short journey and note the encrypted fare response.
  2. Start booking a ticket for a longer journey and intercept the fare response.
  3. Replace the longer journey's fare response with the shorter journey's response.
  4. Proceed to payment and complete the booking at the lower fare.
  5. Access the ticket history endpoint and change the ticket ID to view other tickets.

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.

When you book a metro ticket online, your browser asks the server how much it costs. The server replies with the price, and then you pay. The problem was that the server did not check that the price you paid matched the journey you selected, so you could swap in a cheaper price. Also, the web address for viewing your ticket history used a simple number, so changing that number let you see other people's tickets.

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.

More by Manav Bankatwala

View all

3 more disclosed reports, best first.

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.