Access private list metadata
A private list's metadata could be read by any user through an API endpoint that did not check the list's visibility flag. An attacker could fetch the title, description and image of any list, including private ones, by guessing incremental list identifiers.
Originally disclosed on HackerOne
- Triaged in 6 days
- Fixed in 27 days
- Paid in 27 days
- Disclosed after 57 days
Overview
When user creates a list, they can choose to not make it public. However the attacker can still access the information that user chose to hide.
Steps to Reproduce
- Log in to Instacart.
- Choose a private list that you want to see, for example the one with id = 10.
- Go to https://www.instacart.com/api/v2/recipes/10
- Response reveals all metadata of the list including title, description and image.
Security Implications
The attacker can use this vulnerability to obtain metadata of any list regardless of what the visible flag is set to. Also, since list id is incremental it's easy to fetch metadata for all Instacart lists, both public and private.
What the report shows
Instacart lets a user create lists and choose whether each list is public or private. The researcher found that the private flag is not enforced when list metadata is fetched through the API, so a list the owner chose to hide can still be read by anyone who knows its identifier.
The reproduction is short and direct:
- Log in to Instacart.
- Choose a private list you want to see, for example the one with id = 10.
- Request the list through the API endpoint below.
- The response reveals all metadata of the list, including title, description and image.
The report gives the URL as https://www.instacart.com/api/v2/recipes/10.
No authentication state, headers or cookies are described beyond the fact that the researcher was logged in to Instacart.
The outcome recorded for the report is a low severity, an information disclosure weakness and a bounty of 100.00 USD. The report does not describe a fix.
Root cause
The report does not describe the cause; it only states that metadata is returned regardless of the visible flag. The report states only that metadata is returned regardless of what the visible flag is set to. The report frames it exactly that way: metadata is returned regardless of what the visible flag is set to.
Impact
An attacker can obtain metadata of any list, public or private, as long as they can address it. Because list identifiers are incremental, the researcher notes it is easy to fetch metadata for all Instacart lists. The exposed fields named in the report are title, description and image. The report does not claim access to list items or any other content, and the impact should be read as limited to that metadata.
How this kind of bug works
This is a broken object-level authorisation problem, sometimes called insecure direct object reference. The application exposes objects by an identifier in the URL or request body, and the server trusts that identifier. Authentication may be enforced (the caller must be logged in), but authorisation is not: the server never asks whether this particular caller is allowed to see this particular object.
It happens for predictable reasons. A resource is modelled with a visibility or ownership attribute, and the read endpoint is written to fetch and serialise the record. When the same record is reachable through a second path, such as an API route, a mobile endpoint or an internal service, the check is often missing there even when it exists elsewhere.
Sequential or otherwise guessable identifiers make the bug far more serious, because enumeration turns a single-object leak into a bulk one. Random identifiers reduce the ease of discovery but are not a fix; the authorisation check is.
Defences are straightforward in principle: every read of an object must resolve the caller's identity and compare it against the object's owner and visibility before returning anything, and the response should be filtered to fields the caller may see. Denying by default, rather than allowing unless a flag says otherwise, avoids the class of mistake where a new field or route inherits no check.
How to test for it
- Identify features where objects have a visibility or sharing setting: lists, documents, projects, saved searches, drafts, albums, reports.
- Create two accounts. With account A, create an object and set it private. Note its identifier.
- With account B, request the object's read endpoint directly, using the identifier from A. Try the web route, the JSON API route and any mobile or versioned API paths you can observe in traffic.
- Repeat while logged out entirely, and repeat with A's own session to confirm the object really is private in the UI.
- If identifiers are sequential, request neighbouring identifiers and check whether other users' objects come back.
A positive result is a response containing the private object's fields, especially title, description or image, returned to an account that should not see it. Compare against the same request for a public object to make sure the difference is the visibility setting and not a caching artefact.
Common false positives: the endpoint returning only a stub (an id and a generic type) with no sensitive fields; the object being private in name only because the owner shared it through a link; cached responses served to the wrong user by a CDN; and endpoints that return 404 for other users' objects but 200 for your own, which is correct behaviour. Check the response body carefully rather than relying on status codes.
How it is fixed
Enforce object-level authorisation on every read path: resolve the caller, load the object, and deny unless the caller owns it or the object is explicitly public. Apply the same check to list, search and export endpoints, not just single-object reads. Filter response fields to what the caller is entitled to see. Where identifiers are guessable, consider non-sequential identifiers as defence in depth, but never as a substitute for the check. Add regression tests that request a private object as a second user and as an anonymous client and expect a denial.
Hunting notes
These bugs cluster around features that gained a visibility toggle late, around API versions that predate the toggle, and around secondary consumers such as mobile apps, embeds and export or feed endpoints. Recon signals worth watching: numeric or otherwise sequential identifiers in URLs and JSON bodies; endpoints that return rich objects with few or no query parameters; and UI features that hide content from other users while the underlying request still carries the identifier.
To make a report land, show the object as private from the owner's side, show the unauthorised response from a second account or from an unauthenticated client, and state precisely which fields leaked. If identifiers are enumerable, demonstrate a small number of other objects rather than dumping many, and describe the scale in words. Keep the impact claim to what you actually retrieved.
What happened, in plain words
Instacart is a grocery shopping service. Among other things, it lets a user build lists, for example a shopping list or a recipe list, and decide whether each list is public or private. A private list is meant to be visible only to its owner, in the same way a diary kept in a locked drawer is not for other people to read.
The researcher found that this choice was not respected everywhere. The service behind the address returned the list's details even though the owner chose to hide it. Anyone who knew a list's number could ask that service for the list and receive its details.
The report is short and direct. The reproduction steps are:
- Log in to Instacart.
- Choose a private list that you want to see, for example the one with id = 10.
- Go to
https://www.instacart.com/api/v2/recipes/10. - The response reveals all metadata of the list, including title, description and image.
Step 1 matters because the researcher was logged in to Instacart. Step 2 matters because it establishes that the list really is private: the owner chose to hide it. Step 3 is the interesting part. The researcher went to a web address that returns the list's data directly. Step 4 is the result: the service answered with the list's details anyway.
A few words need unpacking. A request is what your browser sends to a website when you open a page or click a button: a short message asking for something, plus some context about who is asking. A cookie is a small piece of data your browser stores for a site and sends back with each request, which is how a site remembers that you are logged in. A token is a similar idea in other setups: a string that proves who you are. An API (application programming interface) is a service that answers requests with data rather than with a web page, and it is what a website's own pages use behind the scenes to load content. The path /api/v2/recipes/10 is the address of one such service, and the 10 at the end is the identifier of one particular list.
The report gives the full address as https://www.instacart.com/api/v2/recipes/10.
Line by line: GET is the method, meaning "give me this thing" rather than "change this thing". /api/v2/recipes/10 is the path being asked for, where v2 is a version number of the service and 10 is the list identifier. HTTP/1.1 is the version of the language the browser and server use to talk. Host: www.instacart.com says which website the request is aimed at, because one server can host many sites. The report gives the full address as https://www.instacart.com/api/v2/recipes/10, where https means the connection is encrypted.
The report does not describe any special headers or cookies being sent, only that the researcher was logged in to Instacart.
Why does this matter? The details that came back were the list's title, description and image. That is metadata: information about the list rather than its contents. The report does not claim that the items inside the list were exposed, so the impact should be read as limited to those descriptive fields. Still, the owner explicitly chose to hide the list's title and description.
There is a second problem. List identifiers are incremental, meaning they go up one by one: 1, 2, 3 and so on. If you can read list 10, you can try 11, 12, 13 and so on. The researcher notes that because of this it is easy to fetch metadata for all Instacart lists, both public and private. A single leak becomes a bulk one.
The outcome recorded for the report was a low severity rating, an information disclosure weakness and a bounty of 100.00 USD. The report does not describe a fix.
In general, how this kind of bug works
This is a broken object-level authorisation problem, also called an insecure direct object reference. The name sounds heavy, but the idea is simple. Imagine a hotel where every guest's room key opens every door, and the only thing stopping you from entering someone else's room is that you do not know the room number. The hotel checked that you are a guest (that is authentication) but never checked that this particular room is yours (that is authorisation).
In web terms, the application hands out objects by identifier in the address, and the server trusts whatever identifier arrives. The caller may have to be logged in, but the server never asks whether this caller is allowed to see this object. The visibility setting exists and is stored, but the code that reads the object does not consult it.
This happens for predictable reasons. The check often lives only in the user interface, which hides private lists from other people's screens, and not in the service underneath. When the same record can be reached through a second route, such as an API path, a mobile app endpoint or an internal service, the check is frequently missing there even when it exists elsewhere. Sequential identifiers make it worse, because guessing turns one leak into many. Random identifiers make discovery harder but are not a fix; the authorisation check is.
Defences are straightforward in principle. Every read of an object should work out who is asking, load the object, and refuse unless the caller owns it or the object is explicitly public. The response should also be trimmed to the fields the caller may see. Refusing by default, rather than allowing unless a flag says otherwise, avoids the mistake where a new field or route inherits no check at all.
If you want to look for this kind of bug yourself, here is a beginner-friendly approach:
- Look for features where objects have a visibility or sharing setting: lists, documents, projects, saved searches, drafts, albums, reports.
- Create two accounts. With account A, create an object and set it private. Note its identifier.
- With account B, request the object's read address directly, using the identifier from A. Try the normal web address, the data service address and any mobile or versioned paths you can see in your browser's network tools.
- Repeat while logged out entirely, and repeat with A's own session to confirm the object really is private in the interface.
- If identifiers are sequential, request neighbouring identifiers and check whether other users' objects come back.
A positive result is a response containing the private object's fields, especially title, description or image, returned to an account that should not see it. Compare against the same request for a public object, to make sure the difference is the visibility setting and not a caching artefact, meaning an old copy of a response served to the wrong person.
Watch out for false positives. An endpoint may return only a stub, an identifier and a generic type with no sensitive fields. An object may be private in name only because the owner shared it through a link. A caching layer may serve one user's response to another. And an endpoint that returns "not found" for other users' objects but a normal answer for your own is behaving correctly. Read the response body carefully rather than trusting status codes alone.
The fix is to enforce object-level authorisation on every read path: identify the caller, load the object, and refuse unless the caller owns it or the object is explicitly public. Apply the same check to list, search and export endpoints, not just single-object reads. Filter response fields to what the caller is entitled to see. Where identifiers are guessable, consider non-sequential identifiers as an extra layer, but never as a substitute for the check. Add regression tests that request a private object as a second user and as an anonymous client, and expect a refusal.
These bugs cluster around features that gained a visibility toggle late, around older API versions that predate the toggle, and around secondary consumers such as mobile apps, embeds and export or feed endpoints. Signals worth watching: numeric or otherwise sequential identifiers in addresses and data; endpoints that return rich objects with few or no parameters; and interface features that hide content from other users while the underlying request still carries the identifier.
To make a report land, show the object as private from the owner's side, show the unauthorised response from a second account or from a logged-out client, and state precisely which fields leaked. If identifiers are enumerable, demonstrate a small number of other objects rather than dumping many, and describe the scale in words. Keep the impact claim to what you actually retrieved.
Glossary
- API: a service that answers requests with data rather than web pages, used by websites and apps behind the scenes.
- Authentication: proving who you are, for example by logging in.
- Authorisation: deciding whether the person asking is allowed to do or see this particular thing.
- Broken object-level authorisation: a flaw where the server does not check whether the caller may access the specific object requested.
- Cookie: a small piece of data a browser stores for a site and sends back with each request, often used to remember a login.
- GET: the request method that asks for something to be returned, without changing it.
- Header: an extra line of information attached to a request or response, such as which site is being addressed.
- Host: the part of a request that names the website being contacted.
- HTTPS: the encrypted version of the protocol browsers and servers use to communicate.
- Identifier (id): a number or string that names one particular object, such as list 10.
- Incremental identifier: an identifier that goes up one by one, making other objects easy to guess.
- Information disclosure: a weakness where information that should be hidden is revealed.
- Insecure direct object reference: another name for broken object-level authorisation, where an identifier in the request is trusted without a permission check.
- Metadata: information about an object rather than its contents, such as a list's title, description and image.
- Path: the part of an address after the site name, such as
/api/v2/recipes/10. - Request: the message a browser sends to a server asking for something.
- Response: the message a server sends back, containing the data or an error.
- Status code: a number in a response saying broadly what happened, such as success or not found.
- Stub: a minimal response containing only an identifier and a type, with no sensitive fields.
- Token: a string that proves who you are, similar in purpose to a cookie.
- Visibility flag: a stored setting recording whether an object is public or private.