Skip to content
Info disclosure Disclosed report Beginner

Fetch private list metadata and any user's personal name

The star_toggle endpoint returns full list metadata, including the owner's personal name, even when the list is marked as not visible in search and the name is hidden. An attacker can also query the lists endpoint with any user ID to retrieve that user's personal name, regardless of whether they have any lists.

sameoldstory Follow

Originally disclosed on HackerOne

Bounty$150 View original
  • Triaged in 19 hours
  • Fixed in 3 days
  • Paid in 3 days
  • Disclosed after 20 days

Overview

When a user creates a list, they can choose whether to make the list visible in search and whether to show their name with the list. The problem is that the attacker can still access the information that the user chose to hide. Furthermore, if the attacker gets hold of a user's ID, they can find out user's personal name irrespective of whether the user has created any lists at all.

Steps to Reproduce

Both the victim and the attacker have to be Instacart users.

  1. Victim creates a list and unchecks both "visible in search" and "show my name" boxes.

  2. Victim shares the link publicly.

  3. Attacker follows the shared link and adds the list to favorites. The response from the server reveals the list metadata including victim's personal name, list title, description and images:

    POST /api/v2/lists/10/star_toggle
    
    {
      "meta": {
        "code": 200
      },
      "data": {
        "id": 10,
        "name": "Test",
        "description": "This is the description of a shopping list",
        "user_id": 10,
        "visible": false,
        ...
        "user_name": "Apoorva M",
        ...
      }
    

Security Implications

The attacker can use the star_toggle endpoint to obtain metadata of any list regardless of what the visible flag is set to. Since list ID is incremental it doesn't take much effort to obtain metadata for all Instacart lists, both public and private.

Additional Exploit

There's one more endpoint that, although doesn't reveal nearly as much information, does reveal victim's personal name and doesn't even require the victim to have any lists:

GET /api/v2/lists?user_id=10

{"meta":{"code":200,"author_name":"Apoorva M"},"data":[],"pagination":{"total":0,"per_page":0,"page":1}}

The attacker can either look up personal name of the user they're interested in, or simply dump whole list of Instacart users personal names, since the user ID is also incremental.

The original report as published on HackerOne, by sameoldstory. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Context

Instacart lets users build shopping lists. When a user creates a list, two privacy choices are offered: whether the list is visible in search, and whether the user's name is shown alongside the list. The report examines whether those choices are actually enforced by the API that serves list data.

The researcher found that they are not. A user who hides a list from search and hides their name can still have both exposed through API endpoints that return list metadata, and a second endpoint leaks a user's personal name even when that user has never created a list at all.

Setup

Two Instacart accounts are needed: one belonging to the victim and one belonging to the attacker. Both must be Instacart users. No special tooling is described; the work is done by observing the API responses that the web application receives when the attacker interacts with a shared list link.

Finding it

The starting point is the list creation form. A user can uncheck both the "visible in search" box and the "show my name" box, which signals an intent that the list should not be discoverable and that the owner's identity should not be attached to it. The researcher noticed that the API responses returned to a different user still contained the data those checkboxes were supposed to suppress: the personal name, the list title, the description and the images.

The second observation is that list IDs are incremental. If metadata can be retrieved for one list ID regardless of the visible flag, then it can be retrieved for every list ID in sequence. The same incremental property applies to user IDs, which matters for the additional endpoint described below.

Exploitation

Step 1: Victim creates a private list

The victim creates a list and unchecks both "visible in search" and "show my name". The resulting list is intended to be neither searchable nor attributable to its owner.

Step 2: Victim shares the link

The victim shares the list link publicly. Sharing the link is what gives the attacker a list ID to work with, but as the next step shows, the link itself is not the weakness: the weakness is what the API returns once the attacker acts on the list.

Step 3: Attacker favourites the list and reads the response

The attacker follows the shared link and adds the list to favourites. The server response to that action contains the full list metadata, including the victim's personal name, the list title, the description and the images:

HTTP
POST /api/v2/lists/10/star_toggle

{
  "meta": {
    "code": 200
  },
  "data": {
    "id": 10,
    "name": "Test",
    "description": "This is the description of a shopping list",
    "user_id": 10,
    "visible": false,
    ...
    "user_name": "Apoorva M",
    ...
  }
}

The request targets a single list by its numeric ID in the path. The response body carries the list's id, name, description and user_id, and crucially user_name, which is the personal name the victim chose not to display. The visible field is false, confirming that the list was hidden from search, yet the metadata is returned anyway. The star_toggle response also reveals the list's private metadata.

Because the list ID is incremental, the attacker does not need a shared link for every list. Iterating the ID in the path returns metadata for all Instacart lists, public and private alike.

Additional exploit: name lookup by user ID

A second endpoint reveals less information but still discloses the victim's personal name, and it does not require the victim to have created any lists at all:

HTTP
GET /api/v2/lists?user_id=10

{"meta":{"code":200,"author_name":"Apoorva M"},"data":[],"pagination":{"total":0,"per_page":0,"page":1}}

Here the user ID is passed as the user_id query parameter. The data array is empty and the pagination shows total: 0, so the user has no lists, but the meta object still contains author_name with the personal name. The attacker can use this to look up the name of a specific user, or, since user IDs are also incremental, to dump the personal names of Instacart users in bulk.

Root cause

The privacy settings are not enforced when the API returns list metadata. The visible flag and the "show my name" option are not enforced in the API responses.: the star_toggle endpoint returns the full object, including user_name, regardless of the flag's value. The GET /api/v2/lists endpoint likewise attaches author_name to the response envelope even when there is no list data to return, so the name is disclosed independently of any list existing. The report does not describe the server-side code, so the exact location of the mistake is not stated; what is clear is that the checks the UI implies are missing from the API responses.

Impact

An attacker with an Instacart account can obtain the metadata of any list, public or private, by calling star_toggle with sequential list IDs. That metadata includes the owner's personal name, the list title, the description and the images. Separately, an attacker can resolve any user ID to a personal name through the GET /api/v2/lists?user_id= endpoint, whether or not that user has created any lists, and can enumerate user IDs to collect names at scale. The report does not quantify how many users or lists were affected.

Fix

The report does not state what was changed. The fix that follows from the finding is to enforce the privacy settings server-side: the star_toggle response should omit user_name (and any other hidden fields) when the owner has chosen not to show their name, and should refuse to return metadata for lists the requester is not entitled to see. The GET /api/v2/lists response should not include author_name when the user has not opted to show it, and should not disclose a name for a user with no lists. Whether these changes were made is not described.

Variants to test

  1. Toggle-style endpoints on other targets: any POST that changes a relationship (favourite, follow, like, save) and returns the affected object. A positive result is a response containing fields the owner marked private.
  2. Sequential identifier enumeration: replace the ID in a metadata-returning path with neighbouring values. A positive result is metadata for objects you were never given a link to.
  3. Query-parameter user lookups: endpoints that accept a user_id or similar and return an envelope with a display name. A positive result is a name returned alongside an empty data set.
  4. Privacy flags in the UI: create an object with every visibility option disabled, then request it from a second account. A positive result is any hidden field appearing in the response.

Hunting notes

This class of bug tends to sit where a product offers per-object privacy toggles but the API serialises the whole object for convenience. The signal during recon is a creation form with visibility checkboxes: if the UI hides something, check whether the API does. Incremental IDs in URLs are the second signal, because they turn a single-object leak into a bulk one. The report shows both the hidden fields in the star_toggle response and the name disclosure with no list present. The report records a bounty of 150.00 USD.

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

Instacart is a service where people order groceries online, and one of its features lets users build shopping lists. When you create a list, the site offers you two privacy choices: whether the list can be found in search, and whether your name is shown next to the list. The idea is that if you untick both boxes, the list is not shown in search and your name is not displayed with it.

The researcher found that those choices were not actually respected. Even with both boxes unticked, another user could still get the list's details, including the owner's personal name, the list title, the description and the images. A second, separate request could reveal any user's personal name even if that person had never created a list at all.

This kind of problem is called information disclosure: the system gives out data that the person it belongs to expected to keep private. It is not about breaking a password or guessing a secret; the data is simply handed over to anyone who asks in the right way.

Background you need first

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

  • API: the part of a website that the browser talks to behind the scenes. When you click a button, your browser sends a small message to the API and the API sends data back, usually in a format called JSON (text organised as labelled fields, like a form). Think of the website as a waiter and the API as the kitchen: you never see the kitchen, but it is what prepares what you get.
  • Endpoint: one specific address in the API that does one specific job, for example "add this list to favourites". Each endpoint has a method (what kind of action) and a path (where it lives).
  • GET and POST: two kinds of request. GET asks for data, like reading a page. POST sends data to change something, like submitting a form. A POST can still send data back in its reply.
  • Request and response: the message your browser sends is the request; the message the server sends back is the response. The response usually contains a status code (200 means "fine") and a body with the data.
  • Query parameter: the part of a web address after a question mark, used to pass a value, for example ?user_id=10.
  • ID: a number that identifies a record, such as a list or a user. Many systems simply count upwards: 1, 2, 3 and so on. That is called an incremental ID, and it matters a lot here, because if you can read record 10, you can also try 11, 12, 13.
  • Metadata: data about a thing rather than the thing itself. For a shopping list, the metadata is its title, description, owner and so on.
  • Flag: a yes/no setting stored as a value, such as visible: false meaning "not visible".
  • Authorisation: deciding whether the person asking is allowed to do or see something. A privacy checkbox is only meaningful if the server checks it before answering.

Setting up

You need two Instacart accounts: one plays the victim (the person whose private data should stay private) and one plays the attacker (the person trying to see it). Both have to be ordinary Instacart users. No special software is needed; the whole thing is done by watching what the API sends back when the attacker interacts with a list link the victim has shared.

Finding it

The starting point is the form where a list is created. It lets the user untick "visible in search" and untick "show my name". Unticking them is the user saying, clearly, that the list should not be discoverable and that their identity should not be attached to it.

The researcher then looked at what the API returned to a different user and saw that the data those boxes were meant to hide was still there: the personal name, the list title, the description and the images.

The second observation is about the IDs. List IDs count upwards, so if the details of one list can be fetched no matter what the visible flag says, then the details of every list can be fetched by walking through the numbers. User IDs work the same way, which is what makes the second endpoint below so serious.

Exploitation

Step 1: the victim creates a private list

The victim creates a list and unticks both "visible in search" and "show my name". The result is meant to be a list that cannot be found by searching and cannot be linked to its owner.

Step 2: the victim shares the link

The victim shares the list link publicly. This is what gives the attacker a list ID to work with. But as the next step shows, the link is not the weakness: the weakness is what the API hands back once the attacker acts on the list.

Step 3: the attacker favourites the list and reads the reply

The attacker opens the shared link and adds the list to favourites. The server's reply to that action contains the full list details, including the victim's personal name, the list title, the description and the images:

HTTP
POST /api/v2/lists/10/star_toggle

{
  "meta": {
    "code": 200
  },
  "data": {
    "id": 10,
    "name": "Test",
    "description": "This is the description of a shopping list",
    "user_id": 10,
    "visible": false,
    ...
    "user_name": "Apoorva M",
    ...
  }
}

Line by line:

  1. POST /api/v2/lists/10/star_toggle is the request. POST means it changes something. The path points at list number 10 (/lists/10/) and the action is star_toggle, which is the "add to favourites" action. The list is identified only by the number in the path.
  2. "meta": { "code": 200 } is the reply's status section. Code 200 means the server accepted the request and everything went fine.
  3. "data": { ... } is the actual payload, the details of the list.
  4. "id": 10 is the list's own number.
  5. "name": "Test" is the list title.
  6. "description": "This is the description of a shopping list" is the list description.
  7. "user_id": 10 is the number of the user who owns the list.
  8. "visible": false confirms the list was hidden from search. The setting was saved, but it did not stop the data from coming back.
  9. "user_name": "Apoorva M" is the personal name the victim chose not to display. This is the heart of the bug: the reply includes it anyway.
  10. The ... marks stand for other fields the report does not show.

The important point is that an action which should only record a favourite also acts as a way to read the list's private details. And because list IDs count upwards, the attacker does not need a shared link for every list: changing the number in the path returns the details of every Instacart list, public and private alike.

A second way in: looking up a name by user ID

There is another endpoint that reveals less, but still gives away the victim's personal name, and it does not even require the victim to have created a list:

HTTP
GET /api/v2/lists?user_id=10

{"meta":{"code":200,"author_name":"Apoorva M"},"data":[],"pagination":{"total":0,"per_page":0,"page":1}}

Line by line:

  1. GET /api/v2/lists?user_id=10 asks for the lists belonging to user number 10. GET means it only reads. The user number is passed as the user_id query parameter, after the question mark.
  2. "meta":{"code":200,"author_name":"Apoorva M"} is the status section, and it carries author_name, the personal name of that user. The name is sitting in the envelope around the data, not in the data itself.
  3. "data":[] is an empty list: this user has no lists at all.
  4. "pagination":{"total":0,"per_page":0,"page":1} is the paging information, and total: 0 confirms there is nothing to show.

So the reply says, in effect, "this user has no lists, and by the way, their name is Apoorva M". The attacker can use this to look up the name of one particular user, or, since user IDs also count upwards, to collect the personal names of Instacart users in bulk.

Why it happened

The privacy settings were not enforced by the server. The visible flag and the "show my name" option were not checked when the API prepared the list details: star_toggle returned the whole object, user_name included, whatever the flag said. Likewise, GET /api/v2/lists attached author_name to the reply even when there was no list data to return, so the name came out whether or not a list existed. The report does not describe the server-side code, so the exact place where the check is missing is not stated; what is clear is that the checks the interface implies are absent from the API replies.

What an attacker could do with it

Anyone with an Instacart account could obtain the details of any list, public or private, by calling star_toggle with consecutive list numbers. Those details include the owner's personal name, the list title, the description and the images. Separately, anyone could turn any user number into a personal name through GET /api/v2/lists?user_id=, whether or not that user had ever created a list, and could walk through user numbers to gather names at scale.

How it should have been fixed

The fix that follows from the finding is to enforce the privacy settings on the server: the star_toggle reply should leave out user_name (and any other hidden fields) when the owner has chosen not to show their name, and should refuse to return details for lists the requester is not entitled to see. The GET /api/v2/lists reply should not include author_name when the user has not opted to show it, and should not reveal a name for a user with no lists. Whether those changes were made is not described.

Similar things to try elsewhere

  1. Favourite-style endpoints on other sites: any POST that changes a relationship (favourite, follow, like, save) and sends the affected object back. A good result is a reply containing fields the owner marked private.
  2. Counting IDs: replace the number in a path that returns details with the neighbouring numbers. A good result is details for objects you were never given a link to.
  3. User lookups by query parameter: endpoints that accept a user_id or similar and return a reply with a display name. A good result is a name returned alongside an empty data set.
  4. Privacy switches in the interface: create an object with every visibility option turned off, then request it from a second account. A good result is any hidden field appearing in the reply.

What to watch for when hunting

This kind of bug tends to appear where a product offers per-object privacy switches but the API sends back the whole object for convenience. The clue during recon is a creation form with visibility checkboxes: if the interface hides something, check whether the API does too. Counting IDs in addresses is the second clue, because it turns a leak of one object into a leak of all of them. The report shows the hidden fields in the star_toggle reply and the name disclosure when no list existed. The report records a bounty of 150.00 USD.

Glossary

  • API: the part of a website that the browser talks to behind the scenes to fetch and change data.
  • JSON: a text format for data, made of labelled fields and values, used in API requests and replies.
  • Endpoint: one specific address in an API that performs one specific job.
  • GET: a request that only asks for data, without changing anything.
  • POST: a request that sends data to change something on the server.
  • Request: the message a browser sends to a server.
  • Response: the message a server sends back, usually with a status code and a body.
  • Status code: a number saying how a request went, such as 200 for success.
  • Query parameter: a value passed in the address after a question mark, such as user_id=10.
  • Incremental ID: an ID that counts upwards, so neighbouring numbers belong to other records.
  • Metadata: data about a thing rather than the thing itself, such as a list's title, description and owner.
  • Flag: a yes/no setting stored as a value, such as visible: false.
  • Authorisation: deciding whether the person asking is allowed to see or do something.
  • Information disclosure: a bug where a system gives out data that was meant to stay private.
  • Enumerate: to go through values one by one, such as consecutive IDs, to collect results.
  • Recon: the early stage of looking around a target to spot clues about where problems might be.
  • Bounty: a payment a company makes to someone who reports a valid security problem.

More by sameoldstory

View all

7 more disclosed reports, best first.

More from Instacart

View all

The newest disclosed reports for this program.

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.