[GraphQL IDOR]Leaking credit card information of 1000s of users
A GraphQL endpoint returned users' personal and credit card information based on an 'id' parameter without checking ownership, allowing an attacker to access other users' data. The attacker obtained valid ids from a follower-list endpoint and brute-forced the id parameter to retrieve sensitive data for thousands of users.
Published on infosecwriteups.com
I was hunting on a web application. The program was private; for obvious reasons, let’s say the domain is redacted.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.
I was hunting on a private web application. For obvious reasons, the domain is redacted here as redacted.com. By exploiting two different GraphQL endpoints, I was able to pull mass information about users, including credit card information.

Context
The target is a web application whose API is managed through GraphQL. The application exposes user profiles, a following/follower relationship between users, and profile data that includes personal information and credit card information. When a user creates an account, the application automatically makes that new user follow a set of company executives, which means every account starts with a populated following list.
Setup
- Two accounts on redacted.com, created so that one could be used to request data belonging to the other.
- Burp Suite, with its Repeater tabs used to review the captured GraphQL traffic.
- The GraphQL Raider extension, used to turn the unreadable JSON body of a GraphQL request into a readable form where the query and the variables are shown in separate tabs.
- Burp Intruder, for the brute-force stage.
- Bash scripting, to collect the IDs used as Intruder payloads.
Finding it
During initial recon I noticed that the application used GraphQL for its API management. GraphQL Raider converts the query and variables from the unreadable JSON body into a readable format, with the query and the variables displayed in separate tabs. It also extracted the id variable as an insertion point. The response to that request contains users' personal information, including credit card information.
With two accounts in hand, I checked for IDOR. The application was vulnerable: by supplying the identifier belonging to my other account, I received that account's personal information.
Spotting a weird functionality
The id variable is a 12-character long string, so guessing or brute-forcing the value directly is not practical. I needed a way to obtain valid id values. Going through the Burp Suite Repeater tabs, I found an interesting endpoint: it fetched my following list, and the response contained the id value and profile picture of the users I follow.
Because a new account automatically follows some company executives, this endpoint gives every user a starting set of valid IDs. Clicking on the follower list of these executives sends a GraphQL query that fetches information from the user's profile, and the response contains the user's ID and profile picture for many users. I found a user with a million followers, which can also be exploited.

Exploitation
Step 1: Collect a valid id
I collected an id from the response of the following list of the company executive to create the POC.

Step 2: Confirm the IDOR
Using the collected id in the GraphQL request that returns profile data, the response came back with the personal information of the corresponding user, including credit card information.
Step 3: Brute-force at scale
I observed no protection against brute-force attacks for the GraphQL queries. I grabbed the IDs using bash scripting and brute-forced using Burp Intruder, and obtained thousands of users' sensitive data.
Root cause
The GraphQL query that returns profile data accepts an id variable and returns the corresponding user's personal information, including credit card information, for an account other than the caller's. The identifier is a 12-character string, which prevents guessing, but the application itself hands out valid identifiers through the following-list and follower-list queries, so the entropy of the identifier provides no protection. On top of that, the GraphQL queries had no protection against brute-force attacks, so once a source of valid IDs existed, the data could be harvested at volume.
Impact
An authenticated attacker can read the personal information, including credit card information, of any user whose id they can obtain. Because every new account automatically follows company executives, the attacker can obtain valid IDs from the following list, and with no brute-force protection the data could be harvested at volume.
Fix
The report does not describe what was changed. The fix should be server-side authorisation on the GraphQL resolver: the resolver must derive the caller's identity from the authenticated session and only return records the caller is entitled to, rather than trusting the id variable. In addition, rate limiting or query cost controls on GraphQL queries would remove the brute-force path that made mass collection possible.
Variants to test
- GraphQL queries that take an
idvariable and return profile or account data. A positive result is a response containing another account's data when you substitute an ID you obtained from a different query. - Relationship queries such as following lists and follower lists. A positive result is a response that includes identifiers and profile pictures for many users.
- Default relationships created at signup, such as automatically following company accounts. A positive result is a fresh account that immediately has access to a set of valid identifiers through its own following list.
- Enumerating follower lists of high-profile accounts. A positive result is a large set of valid IDs harvested from a single query.
- Absence of rate limiting on GraphQL endpoints. A positive result is many requests with varying
idvalues succeeding without throttling, which turns a single leaked ID into mass extraction.
Disclosure
Reported on 26th December 2020.
What happened, in plain words
A security researcher was testing a private web application, which he calls redacted.com. While exploring the site, he found that its API (the part of the site that delivers data to the pages you see) was built with GraphQL, a way of asking a server for exactly the data you want. He discovered that by changing a single identifier in a request, he could ask for another user's profile and receive their personal information, including credit card details. He then found a way to collect many valid identifiers from the site itself, and because the site did not limit repeated requests, he was able to pull the sensitive data of thousands of users. He reported the issue on 26th December 2020.

Context
The target is a web application whose API is managed through GraphQL. The application exposes user profiles, a following/follower relationship between users, and profile data that includes personal information and credit card information. When a user creates an account, the application automatically makes that new user follow a set of company executives, which means every account starts with a populated following list.
Setup
To reproduce and investigate, the researcher used:
- Two accounts on redacted.com, created so that one could be used to request data belonging to the other.
- Burp Suite, a tool that sits between your browser and the website, letting you see and modify the requests and responses. Its Repeater tabs let you resend a request over and over with small changes.
- The GraphQL Raider extension, which turns the unreadable JSON body of a GraphQL request into a readable form where the query and the variables are shown in separate tabs.
- Burp Intruder, for the brute-force stage (trying many values automatically).
- Bash scripting, to collect the IDs used as Intruder payloads.
Finding it
During initial recon (the first look around the site), the researcher noticed that the application used GraphQL for its API management. GraphQL Raider converts the query and variables from the unreadable JSON body into a readable format, with the query and the variables displayed in separate tabs. It also extracted the id variable as an insertion point. The response to that request contains users' personal information, including credit card information.
With two accounts in hand, he checked for IDOR (Insecure Direct Object Reference, a vulnerability where changing an identifier in a request lets you access someone else's data). The application was vulnerable: by supplying the identifier belonging to his other account, he received that account's personal information.
Spotting a weird functionality
The id variable is a 12-character long string, so guessing or brute-forcing the value directly is not practical. He needed a way to obtain valid id values. Going through the Burp Suite Repeater tabs, he found an interesting endpoint: it fetched his following list, and the response contained the id value and profile picture of the users he follows.
Because a new account automatically follows some company executives, this endpoint gives every user a starting set of valid IDs. Clicking on the follower list of these executives sends a GraphQL query that fetches information from the user's profile, and the response contains the user's ID and profile picture for many users. He found a user with a million followers, which can also be exploited.

Exploitation
Step 1: Collect a valid id
He collected an id from the response of the following list of the company executive to create the POC (proof of concept, a small demonstration that the vulnerability is real).

Step 2: Confirm the IDOR
Using the collected id in the GraphQL request that returns profile data, the response came back with the personal information of the corresponding user, including credit card information.
Step 3: Brute-force at scale
He observed no protection against brute-force attacks for the GraphQL queries. He grabbed the IDs using bash scripting and brute-forced using Burp Intruder, and obtained thousands of users' sensitive data.
Root cause
The GraphQL query that returns profile data accepts an id variable and returns the corresponding user's personal information, including credit card information, for an account other than the caller's. The identifier is a 12-character string, which prevents guessing, but the application itself hands out valid identifiers through the following-list and follower-list queries, so the entropy of the identifier provides no protection. On top of that, the GraphQL queries had no protection against brute-force attacks, so once a source of valid IDs existed, the data could be harvested at volume.
Impact
An authenticated attacker can read the personal information, including credit card information, of any user whose id they can obtain. Because every new account automatically follows company executives, the attacker can obtain valid IDs from the following list, and with no brute-force protection the data could be harvested at volume.
Fix
The report does not describe what was changed. The fix should be server-side authorisation on the GraphQL resolver: the resolver must derive the caller's identity from the authenticated session and only return records the caller is entitled to, rather than trusting the id variable. In addition, rate limiting or query cost controls on GraphQL queries would remove the brute-force path that made mass collection possible.
Variants to test
- GraphQL queries that take an
idvariable and return profile or account data. A positive result is a response containing another account's data when you substitute an ID you obtained from a different query. - Relationship queries such as following lists and follower lists. A positive result is a response that includes identifiers and profile pictures for many users.
- Default relationships created at signup, such as automatically following company accounts. A positive result is a fresh account that immediately has access to a set of valid identifiers through its own following list.
- Enumerating follower lists of high-profile accounts. A positive result is a large set of valid IDs harvested from a single query.
- Absence of rate limiting on GraphQL endpoints. A positive result is many requests with varying
idvalues succeeding without throttling, which turns a single leaked ID into mass extraction.
Disclosure
Reported on 26th December 2020.
Glossary
- API: Application Programming Interface; a set of rules that lets one piece of software talk to another, like a waiter taking your order to the kitchen.
- GraphQL: A query language for APIs that lets the client ask for exactly the data it needs, rather than receiving a fixed set of fields.
- Endpoint: A specific URL or address where an API accepts requests.
- IDOR (Insecure Direct Object Reference): A vulnerability where an application uses an identifier supplied by the user to access a resource without checking that the user is allowed to access it.
- Brute-force: Trying many possible values automatically until one works.
- Burp Suite: A tool for intercepting and modifying HTTP traffic between a browser and a server.
- Repeater: A Burp Suite feature that lets you resend a single request many times with modifications.
- Intruder: A Burp Suite feature that automates sending many requests with different payloads.
- GraphQL Raider: A Burp Suite extension that makes GraphQL requests readable by separating the query and variables.
- JSON: JavaScript Object Notation; a text format for structured data, often used in API requests and responses.
- Variable: In GraphQL, a named value (like
id) that is supplied separately from the query text. - Resolver: In GraphQL, the server-side function that fetches the data for a particular field in a query.
- Entropy: A measure of randomness or unpredictability; a 12-character string has high entropy, making it hard to guess.
- Rate limiting: A control that restricts how many requests a client can make in a given time period.
- POC (Proof of Concept): A small demonstration that a vulnerability exists and can be exploited.
- Bash: A command-line shell and scripting language used on Unix-like systems.
- Authenticated: Having proven your identity to the system, usually by logging in.
- Session: A period of interaction between a user and a system, often maintained by a cookie or token.
- Cookie: A small piece of data stored by the browser and sent with requests to identify a session.
- Token: A piece of data used to authenticate a user or request, often replacing a password after login.