Seemingly sensitive information at /api/v2/zones
An API endpoint returned zone records containing supervisor names, emails, phone numbers and pay amounts to any logged-in user. An attacker could harvest this data for social engineering or competitive intelligence.
Originally disclosed on HackerOne
- Triaged in 1 hour
- Fixed in 12 days
- Paid in 12 days
- Disclosed after 2 months
Overview
https://www.instacart.com/api/v2/zones is accessible by a regular Instacart user and seems to return sensitive information such as names, emails, phone numbers, money amounts and dates.
GET /api/v2/zones
{
"meta": {
"code": 200
},
"data": {
"zones": [
...
{
"id": 73,
"name": "████",
"created_at": "2014-10-01T01:36:07.302Z",
"updated_at": "2016-06-14T23:32:39.147Z",
...
"active": true,
"supervisor_phone": "███████",
...
"hourly_guarantee_amount_cents": █████████,
"hourly_guarantee_amount_currency": "USD",
"guarantee_ends_at": "2015-12-31T00:00:00.000Z",
...
"applicant_supervisor_name": "█████",
"applicant_supervisor_phone": "████",
...
"applicant_supervisor_email": "██████",
"use_phone_screening": false,
...
"strict_shopper_probation": true,
"picking_only_hourly_guarantee_amount_cents": █████████,
...
Security Implications
It's hard for me to evaluate how sensitive the information is, but it definitely doesn't look like something you would put up on the website for everyone to see. I guess a competitor company could make good use of it. Also an attacker could use the information to plan social engineering attacks.
Context
Instacart exposes a public API under /api/v2/. One of its endpoints, /api/v2/zones, returns the list of operational zones the service uses. Zones carry configuration for how shoppers are recruited and managed in a given area, so the response naturally contains more than a simple list of names.
The report is about that endpoint being reachable by any regular Instacart user, and returning fields that look internal: names, emails, phone numbers, money amounts and dates.
Setup
The only precondition stated in the report is a regular Instacart user account. No special role, tool or version is mentioned. The researcher requested the endpoint with a plain GET and received a 200 response.
Finding it
The researcher noticed that https://www.instacart.com/api/v2/zones is accessible by a regular Instacart user and that the response seems to contain sensitive information such as names, emails, phone numbers, money amounts and dates. The concern was not that the endpoint exists, but that its payload includes fields that do not look like something you would put on the website for everyone to see.
Exploitation
Step 1: request the zones endpoint as a normal user
GET /api/v2/zones
The response came back with a 200 code in its meta block and a data.zones array. The researcher included an excerpt of one zone object, with the values redacted:
{
"meta": {
"code": 200
},
"data": {
"zones": [
...
{
"id": 73,
"name": "████",
"created_at": "2014-10-01T01:36:07.302Z",
"updated_at": "2016-06-14T23:32:39.147Z",
...
"active": true,
"supervisor_phone": "███████",
...
"hourly_guarantee_amount_cents": █████████,
"hourly_guarantee_amount_currency": "USD",
"guarantee_ends_at": "2015-12-31T00:00:00.000Z",
...
"applicant_supervisor_name": "█████",
"applicant_supervisor_phone": "████",
...
"applicant_supervisor_email": "██████",
"use_phone_screening": false,
...
"strict_shopper_probation": true,
"picking_only_hourly_guarantee_amount_cents": █████████,
...
The important parts of the object, as the researcher presents them:
id,name,created_at,updated_atandactivedescribe the zone itself.supervisor_phoneis a contact number for the zone supervisor.hourly_guarantee_amount_cents,hourly_guarantee_amount_currencyandguarantee_ends_atdescribe a pay guarantee, including its amount and expiry date.applicant_supervisor_name,applicant_supervisor_phoneandapplicant_supervisor_emailidentify the person handling applicants for the zone.use_phone_screeningandstrict_shopper_probationare internal recruitment and onboarding flags.picking_only_hourly_guarantee_amount_centsis a second guarantee amount, specific to picking-only work.
No other request, parameter, header or tool is shown in the report.
Root cause
The report does not analyse the code. What it shows is an endpoint that returns the full zone object, including internal contact details, pay guarantee figures and recruitment flags, to any authenticated regular user. The report does not analyse the cause; it only shows that the endpoint returns the full zone object to a regular user. The report does not describe any defence that was in place or why it failed.
Impact
The researcher is explicit that it is hard to evaluate how sensitive the information is, but that it definitely does not look like something you would put up on the website for everyone to see. Two consequences are suggested:
- A competitor company could make good use of the data.
- An attacker could use the information to plan social engineering attacks.
The report does not claim any further exploitation, and does not state how many zones or records were exposed.
Fix
The report does not describe a fix or a retest.
Variants to test
Hunting notes
During recon, the signal is a versioned REST path that returns rich objects with timestamps, flags and contact fields alongside the obvious public attributes.
A bounty of 50.00 USD was awarded, and the report was disclosed on 2016-11-16.
What happened, in plain words
Instacart is a grocery delivery service. Behind its website and apps it runs an API: a set of web addresses that programs use to talk to its servers and fetch data. One of those addresses, /api/v2/zones, is meant to return the list of zones, the operational areas the service is divided into. Each zone carries settings for how shoppers (the people who pick and deliver groceries) are recruited and managed in that area.
The problem in this report is simple to state. Any ordinary logged-in Instacart user could open that address and get back the full zone records, not just a tidy list of area names. Those records included names, email addresses, phone numbers, money amounts and dates. The researcher's point was not that the address exists, but that what comes back from it looks internal, not like something you would publish on a public website.
This kind of issue is called information disclosure: a system hands out data to someone who should not have it. Nothing is broken or taken over; the data is simply given away too freely.
Setup
The only thing the report says you need is a regular Instacart user account. No special role, no extra tool and no particular software version is mentioned. The researcher sent a plain GET request to the endpoint and got a 200 response back.
A GET is the everyday request a browser makes when you open a page or a program makes when it wants to read something. A 200 is the standard code a web server sends to mean "here is what you asked for, all good".
Finding it
The researcher noticed that https://www.instacart.com/api/v2/zones is reachable by a regular Instacart user and that the answer seems to contain sensitive information such as names, emails, phone numbers, money amounts and dates. The concern was not that the endpoint exists, but that its contents include fields that do not look like something you would put on the website for everyone to see.
Exploitation
Step 1: request the zones endpoint as a normal user
GET /api/v2/zones
Line by line:
GETis the method, the verb that says "read this for me"./api/v2/zonesis the path, the part of the address after the site name.apimarks it as a machine-facing address,v2is the second version of it, andzonesis the resource being asked for.
The response came back with a 200 code in its meta block and a data.zones array. An array is just a list. The meta block is a small wrapper that carries status information about the answer, and data is where the actual content lives. The researcher included an excerpt of one zone object, with the values redacted:
{
"meta": {
"code": 200
},
"data": {
"zones": [
...
{
"id": 73,
"name": "████",
"created_at": "2014-10-01T01:36:07.302Z",
"updated_at": "2016-06-14T23:32:39.147Z",
...
"active": true,
"supervisor_phone": "███████",
...
"hourly_guarantee_amount_cents": █████████,
"hourly_guarantee_amount_currency": "USD",
"guarantee_ends_at": "2015-12-31T00:00:00.000Z",
...
"applicant_supervisor_name": "█████",
"applicant_supervisor_phone": "████",
...
"applicant_supervisor_email": "██████",
"use_phone_screening": false,
...
"strict_shopper_probation": true,
"picking_only_hourly_guarantee_amount_cents": █████████,
...
This block is written in JSON, a text format for structured data. Curly braces hold an object, square brackets hold a list, and each entry is a label (the key) followed by a colon and a value. The ... marks are places where the researcher cut the output short. The black blocks are redactions, where the real values were hidden before publishing.
Line by line, the parts that matter:
"meta": { "code": 200 }is the status wrapper, confirming the request succeeded."data": { "zones": [ ... ] }says the payload is an object whosezoneskey holds a list."id": 73is the internal number identifying this zone."name": "████"is the zone's name, redacted."created_at"and"updated_at"are timestamps, when the record was first made and last changed."active": truesays the zone is currently in use."supervisor_phone": "███████"is a contact number for the person supervising the zone."hourly_guarantee_amount_cents","hourly_guarantee_amount_currency"and"guarantee_ends_at"describe a pay guarantee: how much, in which currency, and until when."applicant_supervisor_name","applicant_supervisor_phone"and"applicant_supervisor_email"identify the person who handles applicants for the zone."use_phone_screening": falseand"strict_shopper_probation": trueare internal switches about how applicants are screened and how new shoppers are treated."picking_only_hourly_guarantee_amount_cents"is a second guarantee amount, this one for picking-only work.
No other request, parameter, header or tool is shown in the report. A parameter is an extra instruction added to an address, and a header is extra information sent alongside a request, such as what kind of answer you accept.
Root cause
The report does not analyse the code. What it shows is an endpoint that returns the full zone object, including internal contact details, pay guarantee figures and recruitment flags, to any logged-in regular user. The report does not analyse the cause; it only shows that the endpoint returns the full zone object to a regular user. The report does not describe any defence that was in place or why it failed.
An everyday comparison: a hotel receptionist who hands over the full staff rota, including private mobile numbers and salary notes, to anyone who shows a guest card. The guest card proves you are a guest; it does not prove you should see the rota.
Impact
The researcher is explicit that it is hard to evaluate how sensitive the information is, but that it definitely does not look like something you would put up on the website for everyone to see. Two consequences are suggested:
- A competitor company could make good use of the data.
- An attacker could use the information to plan social engineering attacks.
Social engineering means manipulating people rather than machines: for example, calling a supervisor using a real name and phone number from the data to sound convincing. The report does not claim any further exploitation, and does not state how many zones or records were exposed.
Fix
The report does not describe a fix or a retest.
Variants to test
Hunting notes
During recon, the signal is a versioned REST path that returns rich objects with timestamps, flags and contact fields alongside the obvious public attributes.
A bounty of 50.00 USD was awarded, and the report was disclosed on 2016-11-16.
Glossary
- API: a set of web addresses and rules that programs use to exchange data with a service, rather than pages meant for people to look at.
- Endpoint: one specific address in an API, such as
/api/v2/zones, that does one specific job. - GET: the request method used to read something from a server.
- 200: the standard response code meaning the request succeeded and the answer follows.
- JSON: a text format for structured data, built from objects in curly braces and lists in square brackets.
- Object: in JSON, a set of labelled values held between curly braces.
- Array: in JSON, an ordered list held between square brackets.
- Key: the label in a JSON object, such as
supervisor_phone. - Payload: the actual content of a request or response, as opposed to its status or headers.
- Parameter: an extra instruction attached to an address to change what it returns.
- Header: extra information sent with a request or response, such as the accepted answer format.
- Authentication: proving who you are, for example by logging in.
- Authorisation: deciding what a proven user is allowed to see or do.
- Information disclosure: a flaw where a system gives out data to someone who should not have it.
- Zone: an operational area that Instacart divides its service into, with its own recruitment and management settings.
- Shopper: the person who picks and delivers groceries for Instacart.
- Timestamp: a date and time recorded in a standard machine-readable form.
- Redaction: hiding real values in a published document, here shown as black blocks.
- Social engineering: manipulating people into doing something, using convincing personal details rather than technical tricks.
- REST: a common style of API design where each address represents a resource, such as a list of zones.
- Recon: the early stage of security testing where you map out what a system exposes.
- Low-privilege account: an ordinary user account with no special rights.
- Unauthenticated request: a request made without logging in at all.
- Bounty: a payment a company makes to someone who reports a valid security problem.