Skip to content
IDOR Write-up Beginner

Easily leaking passenger information on an Airline

The airline's check-in and other features fetched passenger information using only a booking reference, without verifying the last name. An attacker could change the booking reference to another value and view other passengers' sensitive details.

zseano Follow

Published on medium.com

{{media:0}}

Sean (zseano), 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This write-up describes a set of IDOR findings on an airline's main web application, reported through a YesWeHack bug bounty program. The application is the production site that thousands of passengers use daily to manage their bookings, and it holds sensitive passenger data such as passport information. The feature at the centre of the findings is online booking retrieval and check-in: normally a passenger proves ownership of a booking by supplying both a booking reference and a last name before any passenger information is shown.

Sean (zseano)
Sean (zseano) From the original on medium.com

The author notes that the program's scope was tightly limited, so the work stayed on the main web application throughout.

Setup

The researcher used no recon tools at all and targeted only the main web application. The whole effort took roughly 15 hours at most, spread over three days. The precondition for testing was a valid booking reference of his own: he signed up and bought a ticket for £20 on a flight the following year, then used that booking as the anchor for testing. He also found, by searching the web for the airline, a 2018 promotion that contained another booking reference; he did not know whether it was valid and saved it for later reference. He stresses that IDOR testing should always be done against your own accounts or IDs owned by the company, so that real users are not affected.

Finding it

The researcher's methodology is to use the website as intended rather than to attack it with tooling. After purchasing the flight, he walked through the booking and check-in flows and captured the requests they generated. The thing that looked wrong was the ownership check: the site's booking lookup is supposed to require a booking reference and a last name, but when checking in, the request that fetched his passenger information carried only the booking reference as the parameter. That meant the second factor, the last name, was not being enforced on that endpoint.

Exploitation

Step 1: Obtain a legitimate booking reference

He bought a ticket for £20 on a flight the following year, giving him a valid booking reference to work with, and kept the booking reference from the 2018 promotion as a second candidate.

Step 2: Capture the check-in request

While going through check-in as a normal user, he captured the request that fetched his passenger information. The report does not reproduce the raw request; it states that the request used only his booking reference as the parameter, in a parameter named bookingRef.

Step 3: Change the booking reference

He changed the bookingRef parameter to another booking reference. The response displayed the other passenger's information to him. In his words: that easy, no tools needed, no crazy skills.

Step 4: Repeat across every feature that takes a booking reference

He then went looking for as many features as possible that required a booking reference and found multiple areas leaking full passenger information. The issue affected pretty much all features which handled a booking reference.

Image for post
Image for post From the original on medium.com

Step 5: Consider mass enumeration

Booking references for flights are easily guessable: they are only up to 6 characters long and usually contain only 2 numbers. Generating every combination and running a tool to mass-scrape passenger information would not be hard.

Root cause

The application used the booking reference as the sole identifier for retrieving passenger information on the affected endpoints, instead of also requiring the last name (or another proof of ownership) as the booking lookup flow normally does. The check that ties a booking to the person requesting it was missing or not applied on those endpoints, so any caller who supplied a different reference received that booking's data. The report does not describe the server-side code, so the exact implementation gap is not shown; The report does not describe the server-side code, so the exact implementation gap is not shown.

Impact

An attacker with any valid booking reference, including one they obtained legitimately by buying a cheap ticket, could view full passenger information for other bookings by changing the bookingRef value. Because references are short and follow a predictable pattern, the data could plausibly be harvested at scale by enumerating combinations. The affected data is sensitive passenger information, for an airline whose production site serves thousands of users daily. The report does not state how the program rated the severity or what bounty was paid.

Fix

Based on the finding, the fix is to enforce proof of ownership on every endpoint that accepts a booking reference, requiring the last name (or an equivalent authenticated check) alongside the reference before returning any passenger data, rather than trusting the reference alone.

Variants to test

  1. Drop the second factor. On any lookup that normally asks for two values (reference plus surname, order number plus email), capture the request and remove the second parameter. A positive result is a response containing the record without the second value being supplied.
  2. Swap the identifier. Replace the reference or ID with one belonging to another account or a company-owned record. A positive result is another party's data in the response instead of an access error.
  3. Try integers against GUIDs. Where an endpoint uses an "encrypted" value or GUID, try an integer in its place; the report notes integer values are sometimes accepted anyway.
  4. Inject an ID into JSON bodies. Add "id":1 to JSON POST requests even when the field is not present; it may still be handled, producing a blind IDOR.
  5. Enumerate short references. Where references are short and partly numeric, generate combinations and check whether responses return records you do not own. A positive result is passenger data for references you never held.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

An airline runs a website where passengers manage their flights: they look up a booking, check in, and see details about the people travelling. To look at a booking, the site is supposed to ask for two things: the booking reference (the short code printed on your ticket, something like a six-character mix of letters and numbers) and the passenger's last name. Two pieces of information, so that a stranger who happens to see your reference cannot open your booking.

On several parts of the site, that second check was missing. The page that fetched passenger details only needed the booking reference. Change the reference to somebody else's and their passenger information appeared on screen. The researcher who found this bought a cheap ticket of his own, captured the request his browser sent during check-in, and swapped his reference for another. That was the whole attack.

This is called an IDOR, short for Insecure Direct Object Reference. The name sounds technical but the idea is simple: the website uses a value you can see and change (a booking reference, a user number, an order ID) to decide which record to show you, and it never checks that the record actually belongs to you. Think of a hotel where the receptionist hands you a key labelled room 12, and the key opens any room whose number you write on it. The lock works; nobody checked that room 12 is yours.

Sean (zseano)
Sean (zseano) From the original on medium.com

The write-up was published on 4 February 2020 by Sean, known online as zseano, and describes findings made on a YesWeHack bug bounty program. A bug bounty program is an arrangement where a company invites independent researchers to test its systems and pays or thanks them for reporting problems responsibly, instead of the researcher being treated as a criminal.

Background you need

A few ideas come up again and again below, so here they are from zero.

The web application. When you open a site in your browser, your browser sends requests to a server and the server sends back pages and data. The airline's main web application is the public site that thousands of passengers use every day to manage their bookings. It is the production site, meaning the real one with real customers, not a test copy.

An API and an API request. Many modern sites are built from pieces: the page you see is assembled from data the browser fetches separately, often as JSON (a plain text format for structured data, looking like {"name": "value"}). Each of those fetches is a request to an API, which is simply the part of the server that answers such requests with data rather than with a full web page. You can watch these requests in your browser's developer tools, on the Network tab, which lists every request the page makes.

Parameters. A request often carries parameters: named values that tell the server what you want. In a web address they appear after a question mark, as in ?bookingRef=ABC123. The name is bookingRef and the value is ABC123. The server reads the value and decides what to return.

Capturing a request. To see exactly what your browser sends, you perform the action normally (click check-in, open your booking) while the Network tab is recording, then click the request in the list and look at its details. Some tools let you resend that request with a changed value; the researcher did not name any tool, and stresses that none of this needed special tooling.

IDOR. As above: the server takes an identifier from the request and returns the matching record without verifying that the requester is entitled to it. The identifier is direct (it points straight at a record) and the reference is insecure (you can change it freely). The test is always the same: take a request that returns your own data, change the identifier to one that is not yours, and see whether you get an error or somebody else's data.

Why test only with your own records. If you change a reference to a stranger's and their data comes back, you have just looked at a real person's private information. That is why the researcher insists on testing against your own accounts, or against IDs the company owns and has authorised you to use. The proof is the same either way, and nobody's privacy is harmed.

Scope. A bug bounty program defines a scope: the list of systems you are allowed to test. This program's scope was tightly limited, so the researcher stayed on the main web application throughout and did not wander onto other systems.

Setting up

The researcher used no reconnaissance tools at all. Reconnaissance means the automated scanning and mapping of a target that many testers start with; he skipped it and simply used the site the way a customer would. The whole effort took roughly 15 hours at most, spread over three days.

The one thing he needed before testing was a booking of his own. He signed up, bought a ticket for £20 on a flight the following year, and used that booking as the anchor for everything else. Having a real booking means you can see exactly what a legitimate request looks like, which is the baseline you compare every tampered request against.

He also searched the web for the airline and found a promotion from 2018 that contained another booking reference. He did not know whether that reference was still valid, so he saved it for later. A reference found in public material is a useful second candidate.

Finding it

The method is to use the website as intended rather than to attack it. After buying the flight, he walked through the booking and check-in flows and captured the requests they generated. The point of walking through normally is that you learn the intended rules: which values the site asks for, in which order, and what it sends behind the scenes.

The thing that looked wrong was the ownership check. The booking lookup is supposed to require a booking reference and a last name before showing anything. But when checking in, the request that fetched his passenger information carried only the booking reference. The last name, the second piece of proof, was not being enforced on that endpoint. An endpoint is simply one address on the server that handles one kind of request; the check existed on the page you see, but not on the endpoint behind it.

Exploitation

Step 1: Obtain a legitimate booking reference

He bought a ticket for £20 on a flight the following year, which gave him a valid booking reference to work with, and kept the reference from the 2018 promotion as a second candidate. Why: you cannot demonstrate that a lookup returns somebody else's data unless you first have a lookup that returns your own.

Step 2: Capture the check-in request

While going through check-in as a normal user, he captured the request that fetched his passenger information. The report does not reproduce the raw request. It states that the request used only his booking reference as the parameter, in a parameter named bookingRef. Why this matters: the presence of a single parameter, where the visible flow asks for two values, is the clue that the second check may live only in the page and not in the server.

Step 3: Change the booking reference

He changed the bookingRef parameter to another booking reference, and the response displayed the other passenger's information to him. In his words: that easy, no tools needed, no crazy skills. Why it worked: the server treated the reference as proof enough, so any reference that existed returned its booking.

Step 4: Repeat across every feature that takes a booking reference

He then looked for as many features as possible that required a booking reference and found multiple areas leaking full passenger information. The issue affected pretty much all features which handled a booking reference. Why repeat: one vulnerable endpoint is a bug, but the same mistake across every feature that touches bookings shows a pattern in how the application was built, and it widens what an attacker could reach.

Image for post
Image for post From the original on medium.com

Step 5: Consider mass enumeration

Booking references for flights are easily guessable: they are only up to 6 characters long and usually contain only 2 numbers. Generating every combination and running a tool to mass-scrape passenger information would not be hard. Enumeration means trying values one after another, systematically; mass-scraping means collecting the results automatically at volume. Why this raises the impact: a single wrong reference is one leaked booking, but a script that walks through every possible reference could collect many.

Why it happened

On the affected endpoints, the application used the booking reference as the only identifier for retrieving passenger information, instead of also requiring the last name, or another proof of ownership, as the normal lookup flow does. The check that ties a booking to the person asking for it was missing or not applied there, so any caller who supplied a different reference received that booking's data. The report does not describe the server-side code, so the exact implementation gap is not shown; The report does not describe the server-side code, so the exact implementation gap is not shown.

What it means

Anyone holding any valid booking reference, including one obtained legitimately by buying a cheap ticket, could view full passenger information for other bookings by changing the bookingRef value. Because references are short and follow a predictable pattern, the data could plausibly be harvested at scale by enumerating combinations. The data at stake is sensitive passenger information on a production site serving thousands of users daily.

How it should be fixed

Based on the finding, the fix is to enforce proof of ownership on every endpoint that accepts a booking reference: require the last name, or an equivalent authenticated check, alongside the reference before returning any passenger data, rather than trusting the reference alone. The lesson generalises: a check that exists in the page must also exist on the server, because the page can be bypassed and the server cannot.

Things to try on your own targets

These are the variants the write-up suggests, each with the reasoning behind it.

  1. Drop the second factor. On any lookup that normally asks for two values (reference plus surname, order number plus email), capture the request and remove the second parameter. A positive result is a response containing the record without the second value being supplied. Why: it tests whether the second value is checked by the server or only by the page.
  2. Swap the identifier. Replace the reference or ID with one belonging to another account or a company-owned record. A positive result is another party's data in the response instead of an access error. Why: this is the core IDOR test, and using your own second account or a company record keeps it safe.
  3. Try integers against GUIDs. Where an endpoint uses an "encrypted" value or GUID, try an integer in its place; the report notes integer values are sometimes accepted anyway. A GUID is a long, random-looking identifier; the point is that a server may still understand a simple number even when the visible value looks unguessable.
  4. Inject an ID into JSON bodies. Add "id":1 to JSON POST requests even when the field is not present; it may still be handled, producing a blind IDOR. Blind here means you do not see the record on screen, but the server acts on the value anyway, so the effect shows up elsewhere.
  5. Enumerate short references. Where references are short and partly numeric, generate combinations and check whether responses return records you do not own. A positive result is passenger data for references you never held. Why: short, patterned references make guessing practical, which turns a single leak into a bulk one.

Glossary

  • API: the part of a server that answers requests with data, often in JSON, rather than with a full web page.
  • Blind IDOR: an IDOR where the tampered value is accepted and acted on by the server even though the result is not directly shown to you.
  • Booking reference: the short code, up to 6 characters here, that identifies a flight booking.
  • Bug bounty program: an arrangement where a company invites researchers to test its systems and rewards responsible reports.
  • Endpoint: one address on a server that handles one kind of request.
  • Enumeration: trying values one after another, systematically, to find the ones that work.
  • GUID: a long, random-looking identifier used to refer to a record.
  • IDOR (Insecure Direct Object Reference): a flaw where the server uses an identifier from the request to pick a record without checking that the requester is allowed to see it.
  • JSON: a plain text format for structured data, written as name and value pairs.
  • Mass-scraping: collecting data automatically at volume, here by walking through many references.
  • Network tab: the part of a browser's developer tools that lists every request the page makes.
  • Parameter: a named value sent with a request, such as bookingRef in ?bookingRef=ABC123.
  • Production site: the real, live site used by actual customers.
  • Reconnaissance (recon): automated scanning and mapping of a target before testing; the researcher used none.
  • Scope: the list of systems a bug bounty program allows you to test.
  • Second factor: a second piece of proof, such as a last name, required alongside the first before data is shown.
  • Severity: a rating of how serious a vulnerability is.
  • YesWeHack: the bug bounty platform through which these findings were reported.

More by zseano

View all

10 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.