IDOR allows user to access report details via reference.json endpoint
An IDOR on the report reference endpoint let VDP accounts retrieve private report details from other programs, even though the request was rejected with an access-denied error. The error response body leaked the report subject in the context.subject field.
Originally disclosed on HackerOne
- Triaged in 4 hours
- Fixed in 7 days
- Paid in 33 hours
- Disclosed after 3 months
Summary by the program
Summary:
An information disclosure vulnerability on the /reports/{id}/reference.json endpoint allowed VDP accounts created via hackerone.com/vdp-sign-up to access certain private report details. While the endpoint returned HTTP 422 "You do not have the appropriate access," the error response contained additional report details in the context.subject field.
Description:
By sending a POST request to the /reports/{report_id}/reference.json endpoint with an empty JSON body {}, VDP users could retrieve information about private reports belonging to other programs despite receiving an access-denied error. Although the endpoint correctly rejected unauthorized access with an HTTP 422 status code, it inadvertently included private report data in the error response body.
Steps To Reproduce:
- Create a VDP account at
hackerone.com/vdp-sign-up - Log in with the VDP account
- Obtain an approved test report ID from https://hackerone.com/security?type=team (these reports contain flags to include in your POC),
- Send a POST request to
https://hackerone.com/reports/[TEST_REPORT_ID]/reference.jsonwith the following structure:
POST /reports/[TEST_REPORT_ID]/reference.json HTTP/2
Host: hackerone.com
Cookie: [your session cookie]
Content-Type: application/json
X-Csrf-Token: [your CSRF token]
Content-Length: 2
{}
- Observe that despite receiving HTTP 422 with "You do not have the appropriate access," the response contains report details in the
context.subjectfield
Note: This vulnerability has been fixed. We have found no evidence of misuse in our investigation to date, and no action is required from users..
Context
HackerOne runs a vulnerability disclosure programme (VDP) sign-up flow at hackerone.com/vdp-sign-up. Accounts created through that flow are VDP accounts: they can view certain reports, but they are not full programme members and should not be able to read private report details belonging to other programmes.
The feature involved is the report reference endpoint, /reports/{id}/reference.json. It returns reference information about a report identified by its numeric ID. The bug was that this endpoint leaked private report details to VDP accounts even while refusing them access.
Setup
No special tooling is described. The preconditions are:
- A VDP account created at
hackerone.com/vdp-sign-up. - A session for that account, giving a session cookie and a CSRF token.
- An approved test report ID, obtained from
https://hackerone.com/security?type=team. Those reports contain flags to include in a proof of concept.
The request is sent as an authenticated POST with a JSON content type, the session cookie, the CSRF token and an empty JSON object as the body.
Finding it
The endpoint was expected to reject a VDP account asking for a report it does not own. It did reject the request, with HTTP 422 and the message "You do not have the appropriate access." The problem was in the body of that rejection: the error response carried additional report details in the context.subject field. So the access check worked at the status-code level while the error payload still disclosed data about private reports belonging to other programmes.
Exploitation
Step 1: create and use a VDP account
Create an account at hackerone.com/vdp-sign-up and log in with it. This account is the low-privilege position from which the request is made.
Step 2: pick a test report ID
Take an approved test report ID from https://hackerone.com/security?type=team. These reports contain flags that go into the proof of concept, so a successful leak can be demonstrated against a known value.
Step 3: send the POST request
Send the following request, substituting the test report ID, your session cookie and your CSRF token:
POST /reports/[TEST_REPORT_ID]/reference.json HTTP/2
Host: hackerone.com
Cookie: [your session cookie]
Content-Type: application/json
X-Csrf-Token: [your CSRF token]
Content-Length: 2
{}
The path identifies the target report by ID. Content-Type: application/json and the two-byte body {} satisfy the endpoint's expectation of a JSON request. X-Csrf-Token carries the token tied to the session, and the Cookie header carries the authenticated session.
Step 4: read the error body
The response comes back as HTTP 422 with "You do not have the appropriate access." Despite that, the response contains report details in the context.subject field. The status code says the request failed; the body says more than it should.
Root cause
The access check on /reports/{id}/reference.json rejects the VDP account, but the rejection is rendered as a structured error that includes report data in context.subject. The rejection is rendered as a structured error that includes report data in context.subject. The endpoint returned the correct denial status, so the leak was only visible by reading the response body.
Impact
A VDP account, which is available through public sign-up, could retrieve information about private reports belonging to other programmes. The disclosure is limited to what appears in the context.subject field of the error response, and the request still fails with HTTP 422. The programme states that the vulnerability has been fixed and that its investigation found no evidence of misuse to date, with no action required from users.
Fix
The report states that the vulnerability has been fixed.
Variants to test
- Other JSON endpoints that return structured errors. Send an authenticated request for an object you do not own and read the full body, not just the status. A positive result is any field in the error that describes the target object, such as a title, subject, owner or identifier you could not otherwise see.
- Endpoints that answer 422, 403 or 404 with a body. Compare the body for an existing object you cannot access against one for a non-existent ID. A positive result is a difference that confirms the object exists or reveals its contents.
- Low-privilege account types created through public sign-up flows. Repeat the same request with each role and check whether the denial payload changes. A positive result is a denial that still carries object data for the weaker role.
- Reference and metadata sub-resources, such as
reference.json-style paths under other objects. Request them with an empty JSON body and inspect the error. A positive result is private data incontextor an equivalent error container.
Hunting notes
This kind of bug hides in error handling rather than in the happy path. The signal during recon is an endpoint that returns a rich, structured error body on denial: if a 403 or 422 comes back with a JSON object containing fields named after the resource, test it with an account that should not see that resource. Public sign-up flows are worth mapping because they give you a legitimate low-privilege account without any approval step.
The test reports contain flags to include in the proof of concept.
What happened, in plain words
HackerOne is a website where security researchers report bugs to companies. Companies publish "programmes" there, and each programme has reports: write-ups of security problems, often containing private details that only the company and the researcher should see.
HackerOne also lets anyone create a special kind of account through a public sign-up page, hackerone.com/vdp-sign-up. These are called VDP accounts (VDP stands for vulnerability disclosure programme). A VDP account is a low-privilege account: it can look at some reports, but it is not a full member of any company's programme and it should never be able to read private report details that belong to other programmes.
The bug was in one small part of the site, an endpoint at /reports/{id}/reference.json. An endpoint is simply a web address that a program (rather than a person clicking links) talks to; think of it as a service counter in a building, where you hand over a request and get an answer back. The {id} part is a number that identifies one specific report, like a ticket number.
When a VDP account asked this endpoint for a report it was not allowed to see, the site did the right thing at first glance: it refused, answering with HTTP 422 and the message "You do not have the appropriate access." HTTP 422 is a status code, a short number a web server sends back to say "I understood your request but I cannot process it." The problem was in the body of that refusal. Alongside the error message, the response carried extra details about the private report in a field called context.subject. So the door was locked, but the refusal note had the private information written on it.
The report says the vulnerability has been fixed, that no evidence of misuse was found, and that users do not need to do anything.
The pieces you need to understand first
Before walking through the steps, here are the few ideas the whole report rests on.
- API and endpoint. A website like HackerOne is not only pages you click. Its own pages and apps also talk to it behind the scenes by sending requests to addresses called endpoints, and getting structured answers back. It is like ordering at a restaurant: you do not walk into the kitchen, you give the waiter an order and receive a plate. The endpoint is the waiter's counter.
- JSON. A common format for those structured answers, made of names and values in curly braces, for example
{"name": "value"}. It is a way of writing data so a program can read it reliably, a bit like a very strict form with labelled boxes. - Cookie. A small piece of text your browser stores for a website and sends back with every request. On a logged-in site it usually identifies your session, meaning "this request comes from the person who logged in as this account." Think of it as the wristband you get at an event: it proves you are inside, without you showing your ID every time.
- CSRF token. CSRF stands for cross-site request forgery, an attack where another website tricks your browser into sending a request you did not intend. To prevent it, the site gives your session a secret value, the CSRF token, which must be included in requests that change or fetch data. It is like a second signature on a form, so a forged form without it is rejected.
- POST request. A request that sends data to the server, as opposed to simply asking for a page. The report uses POST with an empty JSON body,
{}, which is just an empty set of curly braces: a valid JSON object containing nothing. - IDOR. Insecure Direct Object Reference. This is the vulnerability class here. It means the site lets you name an object directly by its identifier (here, a report number) and does not properly check that you are allowed to see that particular object. The everyday comparison: a hotel where room keys are numbered, and the reception hands you key number 12 without checking that room 12 is yours. The identifier is not secret, so the only protection must be the permission check.
- Status code versus response body. Every HTTP answer has a status code (a number such as 200 for success, 403 for forbidden, 422 for unprocessable) and a body (the actual content). The bug lives in the gap between the two: the code said "no", the body still said something.
Setting up
The report describes no special tools. You need three things:
- A VDP account created at
hackerone.com/vdp-sign-up. - A logged-in session for that account, which gives you a session cookie and a CSRF token.
- An approved test report ID, taken from
https://hackerone.com/security?type=team. Those reports are deliberately set up for testing and contain flags, which are known marker values you can look for in a proof of concept. Having a known value matters: if you find it in a response you were not supposed to get, you have proof of the leak rather than a guess.
The request itself is an authenticated POST with a JSON content type, carrying the session cookie, the CSRF token, and an empty JSON object as the body.
Finding it
The expectation was simple: a VDP account asking for a report it does not own should be turned away. And it was turned away, with HTTP 422 and the message "You do not have the appropriate access."
The problem was in the body of that rejection. The error response carried additional report details in the context.subject field. In other words, the permission check worked at the level of the status code, while the error payload still disclosed data about private reports belonging to other programmes. Anyone reading only the status code would see a correct refusal; anyone reading the body would see the leak.
Exploitation
Step 1: create and use a VDP account
Create an account at hackerone.com/vdp-sign-up and log in with it. This account is the low-privilege position from which the request is made. The point of using a weak account is to show that the data is reachable by anyone who can sign up publicly, not just by an insider.
Step 2: pick a test report ID
Take an approved test report ID from https://hackerone.com/security?type=team. These reports contain flags that go into the proof of concept, so a successful leak can be demonstrated against a known value. Without a known value, a strange-looking error body is ambiguous; with one, you can point at the exact string that should not have been there.
Step 3: send the POST request
Send the following request, substituting the test report ID, your session cookie and your CSRF token:
POST /reports/[TEST_REPORT_ID]/reference.json HTTP/2
Host: hackerone.com
Cookie: [your session cookie]
Content-Type: application/json
X-Csrf-Token: [your CSRF token]
Content-Length: 2
{}
Line by line:
POST /reports/[TEST_REPORT_ID]/reference.json HTTP/2is the request line.POSTis the method, meaning "here is some data for you to act on". The path names the endpoint and the target report by its ID, andHTTP/2is the version of the protocol used to speak to the server.Host: hackerone.comtells the server which site the request is for. One server can host many sites, so this line says which one.Cookie: [your session cookie]carries your logged-in session, the wristband that proves which account is asking.Content-Type: application/jsonannounces that the body is JSON, so the server knows how to read it.X-Csrf-Token: [your CSRF token]carries the secret tied to your session that proves the request really came from your browser and not from a forged form on another site.Content-Length: 2says the body is two bytes long, which is exactly the size of{}.- The blank line separates the headers from the body.
{}is the body: an empty JSON object. The endpoint expects a JSON request, and this satisfies that expectation without adding anything else.
Step 4: read the error body
The response comes back as HTTP 422 with "You do not have the appropriate access." Despite that, the response contains report details in the context.subject field. The status code says the request failed; the body says more than it should. This is why the step is not "look at the status code" but "read the whole answer".
Root cause
The access check on /reports/{id}/reference.json rejects the VDP account, but the rejection is rendered as a structured error that includes report data in context.subject. The rejection is rendered as a structured error that includes report data in context.subject.
In everyday terms: the guard correctly says "you cannot enter", but the refusal slip is printed from the room's own file, so it repeats what is written inside the room. The endpoint returned the correct denial status, so the leak was only visible by reading the response body.
Impact
A VDP account, which is available through public sign-up, could retrieve information about private reports belonging to other programmes. The disclosure is limited to what appears in the context.subject field of the error response, and the request still fails with HTTP 422. The programme states that the vulnerability has been fixed and that its investigation found no evidence of misuse to date, with no action required from users.
Fix
The report states that the vulnerability has been fixed. In the hotel comparison, the refusal slip should be a blank standard form, not a printout of the guest register.
Variants to test
These are the same idea applied elsewhere, useful if you want to look for similar bugs yourself.
- Other JSON endpoints that return structured errors. Send an authenticated request for an object you do not own and read the full body, not just the status. A positive result is any field in the error that describes the target object, such as a title, subject, owner or identifier you could not otherwise see.
- Endpoints that answer 422, 403 or 404 with a body. Compare the body for an existing object you cannot access against one for a non-existent ID. A positive result is a difference that confirms the object exists or reveals its contents.
- Low-privilege account types created through public sign-up flows. Repeat the same request with each role and check whether the denial payload changes. A positive result is a denial that still carries object data for the weaker role.
- Reference and metadata sub-resources, such as
reference.json-style paths under other objects. Request them with an empty JSON body and inspect the error. A positive result is private data incontextor an equivalent error container.
Hunting notes
This kind of bug hides in error handling rather than in the happy path. The signal during recon is an endpoint that returns a rich, structured error body on denial: if a 403 or 422 comes back with a JSON object containing fields named after the resource, test it with an account that should not see that resource. Public sign-up flows are worth mapping because they give you a legitimate low-privilege account without any approval step.
The test reports contain flags to include in the proof of concept.
Glossary
- API: the set of addresses and rules a website offers so that programs can talk to it directly, rather than through pages a person clicks.
- Endpoint: one specific address in that API, such as
/reports/{id}/reference.json, that accepts a request and returns an answer. - JSON: a text format for structured data, written with names and values in curly braces, easy for programs to read.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- HTTP 422: a status code meaning the server understood the request but could not process it, often used for invalid or disallowed input.
- HTTP 403: a status code meaning forbidden, the server understood the request but refuses to authorise it.
- HTTP 404: a status code meaning not found, the requested thing does not exist (or the server pretends so).
- Status code: the short number at the start of every HTTP response that summarises the outcome.
- Response body: the actual content of the answer, as opposed to its status code.
- POST request: an HTTP request that sends data to the server for it to act on.
- Header: a labelled line in a request or response carrying extra information, such as the cookie or the content type.
- Cookie: a small piece of text stored by the browser and sent back with requests, commonly used to identify a logged-in session.
- Session: the server-side record of you being logged in, tied to your cookie.
- CSRF token: a secret value tied to your session that must be included in certain requests to prove they were not forged by another website.
- CSRF (cross-site request forgery): an attack where another site tricks your browser into sending a request you did not intend.
- Content-Type: a header that says what format the body is in, here
application/json. - Content-Length: a header that says how many bytes long the body is.
- Host: a header that says which site on the server the request is addressed to.
- IDOR (Insecure Direct Object Reference): a bug where an object is named directly by its identifier and the site fails to check that you are allowed to access that particular object.
- VDP (vulnerability disclosure programme): a programme that lets people report security problems; here also the name of the low-privilege account type created through public sign-up.
- Low-privilege account: an account with few permissions, used to test what an ordinary outsider can reach.
- Authorisation: the check of whether a given user is allowed to do or see a given thing.
- Serialisation: turning data in a program into a format such as JSON so it can be sent in a response.
- Error serialisation: building the structured error response, which here accidentally included report data.
context.subject: the field in the error response that carried the leaked report details.- Proof of concept (POC): a demonstration that shows a bug is real, here by finding a known flag value in a response.
- Flag: a known marker value placed in a test report so that a leak can be proven by finding it.
- Recon: the exploratory phase of looking for bugs, mapping what the site offers and how it behaves.
- Bounty: a payment made by a programme to a researcher who reports a valid vulnerability.