Skip to content
Business logic Write-up Advanced

Responsible Vulnerability Disclosure: State-Machine Bypass in Indian Railways Ticketing App(RailOne)

The RailOne ticketing app enforced geofencing and QR validation only on the client side, so an attacker could force the app's state machine to skip those checks and book unreserved tickets from outside the permitted area. The backend trusted the client's assertion that the checks had passed, allowing out-of-bounds ticket generation.

amanmailjan Follow

Published on medium.com

Critical national infrastructure relies heavily on client-side and server-side validation to enforce business rules. Recently, I identified a severe business logic flaw in the official Indian Railways Ticketing application, RailOne.

Aman Yadav, 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

The backend did not independently verify the geofence and QR validation, relying entirely on client-side state.

Impact

Attackers could bypass geofencing and QR checks to book tickets from anywhere, potentially using automated scripts, undermining revenue protection and operational integrity.

What the attacker needed

Android device with the RailOne app; Ability to intercept and modify app traffic; No physical presence near the station required

The fix

The backend was changed to cryptographically verify geofence coordinates and QR validation tokens server-side before invoking the payment gateway and generating the ticket.

How it was found

  1. Pull the base APK from a test device using ADB.
  2. Extract the Flutter native library and run string analysis to find backend API endpoints.
  3. Intercept the app flow before the validation state and force the UI to jump directly to ticket generation.
  4. The backend accepts the request without verifying GPS coordinates, and a valid ticket is generated out-of-bounds.

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.

The app was supposed to check that you are physically near the station before letting you buy a ticket. But that check happened only inside the app on your phone, and the server simply believed the app when it said the check was done. By making the app skip the check, someone could buy a ticket from anywhere.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.