# An attacker can can view any hacker email via  /SaveCollaboratorsMutation operation name 

GraphQL SaveCollaboratorsMutation response leaked pending collaborators' private emails before they accepted the invite, exposing any hacker's registered email.

- Payout: $12,500
- Severity: high
- Program: HackerOne
- Found by: 0xrayan1996
- Disclosed: 2023-07-04
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/2032716
- Library page: https://bugbountylibrary.com/r/h1%3A2032716
- Tags: area:web domain:api domain:web impact:pii-leak kind:bounty platform:hackerone sev:high tech:graphql technique:js-analysis vuln:info-disclosure

**Target:** HackerOne GraphQL /graphql SaveCollaboratorsMutation collaborator invite flow
**Root cause:** The saveCollaborators mutation returns the full collaborator object including email for pending (unaccepted) invites, instead of only username/status.
**Steps:**
1. Create and submit a dummy report.
2. Add a target hacker as collaborator (max 2 invites per report).
3. Send invite; target stays pending until acceptance.
4. Click the pen/edit icon to add more collaborators and capture the request.
5. Observe `POST /graphql` with `operationName: SaveCollaboratorsMutation` containing `username_or_email` entries.
6. Response includes the target's private email even though invite is unaccepted.
**How found:** Researcher noticed the collaborator edit request returned more data than expected and inspected the GraphQL response, spotting the invitee's email in the mutation output before acceptance.
**Exploitation:** Attacker submits a report, invites any hacker by username, then re-opens the collaborator editor and captures the GraphQL response which contains the invitee's registered email. Repeat per report to harvest emails.
**Insight:** GraphQL mutations that echo back input objects often over-return joined user records; capture the raw mutation response (not just the UI) when inviting/adding users to see if private fields like email leak for pending states.

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

**GraphQL SaveCollaboratorsMutation request exposing collaborator emails**

```
POST /graphql HTTP/2
Host: hackerone.com

[sinp]

{"operationName":"SaveCollaboratorsMutation","variables":{"input":{"report_id":2032701,"collaborators":[{"username_or_email":"testmealways","bounty_weight":0.9989999999999999},{"username_or_email":"███████","bounty_weight":0.9989999999999999},{"username_or_email":"███████","bounty_weight":0.9989999999999999}]},"product_area":"collaboration","product_feature":"save_collaborators"},"query":"mutation SaveCollaboratorsMutation($input: SaveCollaboratorsMutationInput!)
```

