# IDOR allows user to access report details via reference.json endpoint

VDP accounts could POST to /reports/{id}/reference.json and receive private report details in the context.subject field of a 422 access-denied error.

- Payout: $15,000
- Severity: critical
- Program: HackerOne
- Found by: sm41ldrag0n79_mbbank
- Disclosed: 2026-10-01
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/3862641
- Library page: https://bugbountylibrary.com/r/h1%3A3862641
- Tags: area:web domain:web impact:data-leak impact:internal-access kind:bounty platform:hackerone sev:critical tech:rest vuln:access-control vuln:idor vuln:info-disclosure

**Target:** /reports/{id}/reference.json endpoint
**Root cause:** The access-denied error response (HTTP 422) leaked private report data in the context.subject field instead of returning a bare error.
**Steps:**
1. Create VDP account at `hackerone.com/vdp-sign-up` and log in
2. Obtain an approved test report ID from hackerone.com/security?type=team
3. Send `POST /reports/[TEST_REPORT_ID]/reference.json` with body `{}`, session cookie, and `X-Csrf-Token`
4. Observe HTTP 422 'You do not have the appropriate access' but response body contains report details in `context.subject`
**Exploitation:** Authenticated VDP user sends POST with empty JSON body to the reference.json endpoint for arbitrary report IDs; the 422 error body leaks private report details via context.subject, enabling enumeration of private reports across programs.
**Insight:** Error responses from authorization checks can leak data in nested fields (context.subject) even when the status code is correct; test access-denied paths with empty/valid bodies and inspect full response bodies, not just status codes.

## Proof of concept (copied exactly from the original report)

**POST to reference.json with empty body**

```
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

{}
```

