How Changing One Customer ID Exposed Other Users’ Pet Recommendations and Earned Me a $1,000 Bounty
The recommendation API trusted a client-supplied customer_id parameter, letting an authenticated user retrieve another customer's pet-product recommendations. A Base64-encoded tracking_id in the response also exposed internal SQL query templates and database table and column names.
Published on medium.com
Hacking
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.
Context
The target was an online retailer's product-recommendation API. The feature returns personalised pet-product recommendations for a signed-in customer. The request that drives it carries several parameters, including a category, a user identifier and a customer identifier. The response includes the recommendations plus a field named tracking_id.
The researcher reports two related issues: a broken access control flaw in how the API selects which customer's recommendations to return, and an information disclosure flaw in the tracking_id value. The company, hostname, API path, customer identifiers, database objects and triager identity are redacted in the write-up, and the researcher notes that no SQL injection was confirmed.
Setup
The researcher used a normal signed-in account on the site. The researcher signed in, opened the account section, and captured the application's traffic with Burp Suite. No special role, elevated privilege or prior knowledge of other customers was needed to reach the vulnerable request.
Finding it
While browsing the account section with Burp capturing traffic, the researcher found a recommendation request in Burp's HTTP history. It contained several parameters:
GET /[REDACTED]? category_id=[CATEGORY_ID]& user_id=[USER_IDENTIFIER]& customer_id=[MY_CUSTOMER_ID]
The request carries three client-supplied values: category_id, user_id and customer_id. The presence of a customer_id alongside an authenticated session is what made the request worth testing: if the server uses that value to decide whose data to return, the client is effectively choosing the identity.
Exploitation
Step 1: Change only the customer ID
The researcher sent the request to Burp Repeater and changed only the customer_id to a nearby value:
customer_id=[ANOTHER_CUSTOMER_ID]
The authenticated session and all other parameters stayed the same. The server responded 200 OK with a different set of pet-product recommendations, associated with the supplied customer ID.
That confirmed the server trusted the customer ID from the URL without checking that it belonged to the authenticated user. If customer IDs were predictable or obtainable elsewhere, an attacker could potentially automate the process and enumerate recommendations belonging to multiple customers.
Step 2: Decode the tracking ID
While examining the response, the researcher noticed a long value in a field named tracking_id. Its format and padding suggested Base64 encoding. Base64 is encoding, not encryption, so the researcher decoded it. The decoded value contained internal SQL filters similar to this sanitised example:
{ "filters": [ { "query": "SELECT 1 FROM [INTERNAL_TABLE] WHERE [INTERNAL_CONDITIONS]", "operation": "in" } ]}
The decoded data exposed internal SQL query templates, database table names and column names used by the recommendation engine. The researcher is explicit that this did not prove the application was vulnerable to SQL injection. Its value is reconnaissance: it could help an attacker understand the database structure and prepare more targeted attacks if another injection vulnerability existed.
Root cause
Two design mistakes combine here.
- The server accepted a client-controlled
customer_idwithout confirming that it belonged to the authenticated session. The identity used to select personalised data came from the request rather than from the session. - The client received internal SQL information that was unnecessary for displaying recommendations. The tracking value was only encoded, so anyone holding it could read the query templates, table names and column names inside.
The server accepted the client-controlled customer ID without confirming it belonged to the authenticated session.
Impact
With a normal account, an attacker could potentially:
- Access pet-product recommendations associated with other customers.
- Enumerate recommendation data by changing customer IDs.
- Learn information about another customer's pet-related interests.
- Recover internal SQL query templates from the tracking value.
- Identify database tables and columns that could support further reconnaissance.
Product recommendations may not look highly sensitive, but this was still a cross-account authorisation failure: a user should never be able to retrieve another customer's personalised data by changing a URL parameter. The SQL disclosure did not prove SQL injection; it could aid reconnaissance if another injection flaw existed.
Fix
The write-up recommends that the application:
- Derive the customer identity from the authenticated session.
- Enforce object-level authorisation before returning personalised data.
- Reject requests for customer IDs that do not belong to the authenticated user.
- Remove SQL queries and database details from client-visible responses.
- Replace the encoded SQL data with an opaque server-generated tracking identifier.
- Monitor repeated requests involving different customer IDs.
The report does not say which of these the company implemented. It states that the security team reviewed the evidence, triaged the report and awarded a $1,000 bounty on February 9, 2024.

Variants to test
- Multiple identity parameters in one request. Look for requests carrying both a session and an identifier such as
customer_id,user_idoraccount_id. Change one at a time and compare responses. A positive result is a200 OKwith data belonging to the other identifier while your session is unchanged. - Encoded opaque fields. Inspect values named
tracking,metadata,debug,stateorcontext. Try Base64 decoding, then look for SQL, table or column names. A positive result is readable internal query text or schema detail in a client-visible response. - Enumeration feasibility. If customer IDs were predictable or obtainable elsewhere, an attacker could potentially automate enumeration. A positive result is a run of successful responses returning other customers' personalised data.
- Authorisation on write paths. Apply the same one-parameter-at-a-time change to requests that update preferences or profile data, not just reads.
Whenever a request contains several identity-related parameters, change them one at a time and compare the responses carefully. The central lesson is that personalised data must be selected using a server-verified identity, not an identifier controlled by the client.
What happened, in plain words
A security researcher found two related mistakes in the product-recommendation feature of an online retailer's website. The feature suggests pet products to signed-in customers. The researcher discovered that by changing one number in a web request, they could see another customer's pet-product recommendations. They also found that a long string in the response, called tracking_id, was not encrypted but only encoded, and when decoded it revealed internal database queries and table names. The researcher reported both issues through the company's bug-bounty programme, and the company awarded a $1,000 bounty on February 9, 2024. No SQL injection was confirmed.
This article explains every step for someone who has never done security testing before. You only need to know how to use a browser and a computer.
Background: what the product and feature do
The target is an online retailer. Like many shops, it has a feature that recommends products to you based on what you have looked at or bought. Because this retailer sells pet supplies, the recommendations are pet products. The feature is powered by an API.
API stands for Application Programming Interface. In a website, it is the part of the server that the page talks to behind the scenes. When you click a button or load a page, your browser sends a request to the API, and the API sends back data, usually in a format called JSON. Think of the API as a waiter: you (the browser) tell the waiter what you want, the waiter goes to the kitchen (the server and database), and brings back your order. You never see the kitchen, only the result.
The recommendation request carries several pieces of information, called parameters. Parameters are like the options you fill in on a form: a category, a user identifier, and a customer identifier. The response contains the recommendations plus a field named tracking_id.
The researcher reports two issues:
- Broken access control: the API decides whose recommendations to return based on a value the client (your browser) sends, instead of checking who you are logged in as.
- Information disclosure: the
tracking_idvalue contains internal SQL queries, table names and column names, visible to anyone who decodes it.
The company name, hostname, API path, customer identifiers, database objects and the identity of the person who triaged the report are redacted (hidden) in the write-up. The researcher also states clearly that no SQL injection was confirmed.
Setting up
The researcher used a normal signed-in account on the site. No special role, no elevated privilege, and no prior knowledge of other customers was needed.
Burp Suite is a tool that sits between your browser and the website and records every request and response. Think of it as a recording device for web traffic: you browse normally, and Burp keeps a log you can inspect and replay. The researcher signed in, opened the account section, and let Burp capture the traffic.
Finding the request
While browsing the account section with Burp capturing traffic, the researcher looked at Burp's HTTP history. HTTP history is the list of all requests and responses Burp has recorded. There, they found a recommendation request containing several parameters:
GET /[REDACTED]? category_id=[CATEGORY_ID]& user_id=[USER_IDENTIFIER]& customer_id=[MY_CUSTOMER_ID]
Line by line:
GETis the type of request. GET means "give me something", as opposed to POST, which usually means "send something"./[REDACTED]is the path on the server. The actual path is hidden in the write-up.category_id=[CATEGORY_ID]is a parameter that selects a product category.user_id=[USER_IDENTIFIER]is a parameter that identifies the user.customer_id=[MY_CUSTOMER_ID]is a parameter that identifies the customer. In the researcher's own request, this was their own customer ID.- The
&symbol separates parameters, and?starts the list of parameters.
The request carries three values supplied by the client: category_id, user_id and customer_id. The presence of a customer_id alongside an authenticated session is what made the request worth testing. Authenticated session means the server knows who you are because you signed in; it usually tracks this with a cookie or a token. A cookie is a small piece of data the server asks your browser to store and send back with every request, like a wristband at an event that proves you paid. A token is similar: a value that proves your identity. If the server uses the customer_id from the URL to decide whose data to return, then the client is effectively choosing the identity, and that is a problem.
Exploitation
Step 1: Change only the customer ID
The researcher sent the request to Burp Repeater. Repeater is a Burp feature that lets you take a captured request, modify it, and send it again as many times as you like, seeing each response. They changed only the customer_id to a nearby value:
customer_id=[ANOTHER_CUSTOMER_ID]
This line means: replace the customer ID with a different one, presumably close to the original number. The authenticated session and all other parameters stayed the same. The server responded 200 OK with a different set of pet-product recommendations, associated with the supplied customer ID.
200 OK is the standard HTTP status code meaning the request succeeded. The important part is that the response contained recommendations belonging to another customer, even though the researcher was still logged in as themselves.
That confirmed the server trusted the customer ID from the URL without checking that it belonged to the authenticated user. If customer IDs were predictable or obtainable elsewhere, an attacker could potentially automate the process and enumerate recommendations belonging to multiple customers. Enumerate means to go through a list of values one by one, often automatically, to see which ones work. If customer IDs were predictable or obtainable elsewhere, a script could potentially enumerate them.
Step 2: Decode the tracking ID
While examining the response, the researcher noticed a long value in a field named tracking_id. Its format and padding suggested Base64 encoding. Base64 is a way of representing binary data as text using letters, digits and a few symbols. It is encoding, not encryption: it does not hide anything, it just changes the format. Think of it like writing a message in Morse code: anyone who knows Morse can read it. Padding refers to the = characters often seen at the end of Base64 strings, which make the length a multiple of four.
The researcher decoded it. The decoded value contained internal SQL filters similar to this sanitised example:
{ "filters": [ { "query": "SELECT 1 FROM [INTERNAL_TABLE] WHERE [INTERNAL_CONDITIONS]", "operation": "in" } ]}
Line by line:
- The outer braces
{ }mark a JSON object, a collection of named values. "filters"is a list (the square brackets[ ]) of filter definitions.- Inside,
"query"holds an SQL statement. SQL is the language used to talk to databases.SELECT 1 FROM [INTERNAL_TABLE] WHERE [INTERNAL_CONDITIONS]is a query that would select something from a table under certain conditions. The table name and conditions are redacted. "operation": "in"describes the type of operation, here "in".
The decoded data exposed internal SQL query templates, database table names and column names used by the recommendation engine. A database table is like a spreadsheet where data is stored; a column is a field in that table, such as "customer_id" or "product_name".
The researcher is explicit that this did not prove the application was vulnerable to SQL injection. SQL injection is a separate attack where an attacker inserts their own SQL code into a query, often to read or change data. Here, the SQL was only visible, not executable. Its value is reconnaissance: it could help an attacker understand the database structure and prepare more targeted attacks if another injection vulnerability existed. Reconnaissance means gathering information about a target before an attack.
Root cause
Two design mistakes combine here.
- The server accepted a client-controlled
customer_idwithout confirming that it belonged to the authenticated session. The identity used to select personalised data came from the request rather than from the session. - The client received internal SQL information that was unnecessary for displaying recommendations. The tracking value was only encoded, so anyone holding it could read the query templates, table names and column names inside.
The server accepted the client-controlled customer ID without confirming it belonged to the authenticated session. Object-level authorisation means checking that the specific item (object) being requested, such as a customer record, belongs to the person asking for it.
Impact
With a normal account, an attacker could potentially:
- Access pet-product recommendations associated with other customers.
- Enumerate recommendation data by changing customer IDs.
- Learn information about another customer's pet-related interests.
- Recover internal SQL query templates from the tracking value.
- Identify database tables and columns that could support further reconnaissance.
Product recommendations may not look highly sensitive, but this was still a cross-account authorisation failure: a user should never be able to retrieve another customer's personalised data by changing a URL parameter. The SQL disclosure did not prove SQL injection; it could aid reconnaissance if another injection flaw existed.
Fix
The write-up recommends that the application:
- Derive the customer identity from the authenticated session.
- Enforce object-level authorisation before returning personalised data.
- Reject requests for customer IDs that do not belong to the authenticated user.
- Remove SQL queries and database details from client-visible responses.
- Replace the encoded SQL data with an opaque server-generated tracking identifier.
- Monitor repeated requests involving different customer IDs.
Opaque means the value has no meaning to the client; it is just a random-looking string that the server can map to something internally. The report does not say which of these the company implemented. It states that the security team reviewed the evidence, triaged the report and awarded a $1,000 bounty on February 9, 2024. Triaged means the security team assessed the report, confirmed it was valid, and decided how to handle it.

Variants to test
- Multiple identity parameters in one request. Look for requests carrying both a session and an identifier such as
customer_id,user_idoraccount_id. Change one at a time and compare responses. A positive result is a200 OKwith data belonging to the other identifier while your session is unchanged. - Encoded opaque fields. Inspect values named
tracking,metadata,debug,stateorcontext. Try Base64 decoding, then look for SQL, table or column names. A positive result is readable internal query text or schema detail in a client-visible response. - Enumeration feasibility. If IDs are sequential or otherwise predictable, script a small range of neighbouring values against your own session. A positive result is a run of successful responses returning other customers' personalised data.
- Authorisation on write paths. Apply the same one-parameter-at-a-time change to requests that update preferences or profile data, not just reads.
Whenever a request contains several identity-related parameters, change them one at a time and compare the responses carefully. The central lesson is that personalised data must be selected using a server-verified identity, not an identifier controlled by the client.
Glossary
- API: Application Programming Interface; the part of a website's server that the browser talks to, sending requests and receiving data.
- Parameter: A named value in a request, like an option on a form, for example
customer_id. - Broken access control: A flaw where the server does not properly check whether the user is allowed to access a resource.
- Information disclosure: A flaw where internal information is exposed to users who should not see it.
- Burp Suite: A tool that records and lets you modify web traffic between your browser and a website.
- HTTP history: Burp's log of all requests and responses.
- Repeater: A Burp feature to modify and resend a request repeatedly.
- Authenticated session: The state of being logged in, proven by a cookie or token.
- Cookie: A small piece of data stored by the browser and sent with requests to identify the user.
- Token: A value that proves identity, similar to a cookie.
- 200 OK: The HTTP status code meaning the request succeeded.
- Enumerate: To go through a list of values one by one, often automatically.
- Base64: An encoding that represents data as text; not encryption.
- Encoding: Changing the format of data without hiding it.
- Encryption: Transforming data so that only authorised parties can read it.
- SQL: The language used to query databases.
- SQL injection: An attack where malicious SQL code is inserted into a query.
- Database table: A structured set of data, like a spreadsheet.
- Column: A field in a database table.
- Reconnaissance: Gathering information about a target before an attack.
- Object-level authorisation: Checking that a specific item belongs to the user requesting it.
- Opaque: A value that has no meaning to the client; only the server understands it.
- Triaged: Assessed and prioritised, as a security team does with a report.