"package_name" can be set as desired when submitting a Pentest Opportunity form
The autosave mutation accepted a package_name field that only internal reviewing staff should set, letting a user choose the value.
- Triaged in 40 days
- Fixed in 3 months
- Paid in 40 days
- Disclosed after 3 months
Summary:
Hello Team,
While filling up the Pentest Opportunity form, the mutation AutoSavePentestOpportunity allowed me to set value to package_name (i.e =="package_name": "premium_p80"==) which should be done only by the internal reviewing staff upon submitting the form.
Steps To Reproduce
-
Create New Pentest
-
Intercept using burp and wait for auto update function to begin
-
You will see the following query
mutation AutosavePentestOpportunity($input: AutosavePentestOpportunityInput!) {
autosavePentestOpportunity(input: $input) {
was_successful
errors(first: 100) {
edges {
node {
id
type
field
message
__typename
}
__typename
}
__typename
}
__typename
}
}
- Include this line before forwarding the request
"package_name": "premium_p80"
███████
-
Complete the form and submit it
-
Now, reopen the submitted form to check if
OpportunityStatusQuerymutation shows the field ==package_name== as set before.
██████████
Check POC Video
██████████
A similar report: #2040756
Impact
Improper access control
Context
HackerOne's platform lets customers create a new Pentest Opportunity through a form. While the form is being filled in, the front end periodically saves the draft through a GraphQL mutation called AutosavePentestOpportunity. The report describes a field, package_name, that the researcher could set from the client side even though it should only be set by internal reviewing staff when the form is submitted.
The weakness is classified as improper access control (generic), rated medium with a CVSS score of 5.2, and the affected asset is hackerone.com. The report was disclosed on 19 June 2024.
Setup
The researcher used a browser to fill in the Pentest Opportunity form and Burp to intercept and modify the traffic. No special role is described beyond being able to create a new Pentest Opportunity and submit the form. The tooling is therefore a normal authenticated session plus an intercepting proxy.
Finding it
While filling up the Pentest Opportunity form, the researcher observed the autosave mutation AutoSavePentestOpportunity and noticed that its input accepted a package_name value. Setting "package_name": "premium_p80" in that input succeeded, even though the researcher states this field should be set only by the internal reviewing staff upon submitting the form. The mismatch between who is supposed to control the field and who can actually set it is what made the behaviour look wrong.
Exploitation
Step 1: Create a new Pentest
Start a new Pentest Opportunity so that the form is open and the autosave mechanism is active.
Step 2: Intercept the autosave request
Intercept the traffic with Burp and wait for the auto update function to begin. The request that appears is the autosave mutation.
Step 3: Inspect the mutation
The intercepted query is the following:
mutation AutosavePentestOpportunity($input: AutosavePentestOpportunityInput!) {
autosavePentestOpportunity(input: $input) {
was_successful
errors(first: 100) {
edges {
node {
id
type
field
message
__typename
}
__typename
}
__typename
}
__typename
}
}
The mutation takes a single AutosavePentestOpportunityInput variable and returns was_successful plus an errors connection with up to 100 edges, each carrying id, type, field and message. The field member of each error node is what would tell the client which input field was rejected, which is relevant because the researcher's change targets one specific input field.
Step 4: Add the field to the input
Before forwarding the request, include this line in the input:
"package_name": "premium_p80"
This injects a package_name member into the autosave input with the value premium_p80. The mutation accepts it, which is the core of the finding: the client can write a field that is meant to be assigned by internal reviewing staff.
Step 5: Complete and submit the form
Finish filling in the form and submit it as normal.
Step 6: Reopen the submitted form
Reopen the submitted form and check whether the OpportunityStatusQuery mutation shows the package_name field with the value that was set earlier. The step is to reopen the submitted form and check whether the OpportunityStatusQuery mutation shows the package_name field with the value that was set earlier.
The report also references a proof of concept video for the full flow.
Root cause
The autosave mutation accepts package_name as part of its input and applies it, without restricting that field to the internal reviewing staff who are supposed to set it on submission. In other words, the server trusts a field in the client-supplied input that should be server-controlled or role-gated. The report does not describe any server-side check that would have rejected the extra field. Whether the omission is in the input schema, the resolver, or both is not stated; likely the input type exposes the field and the resolver writes it without an authorisation check.
Impact
The researcher classifies the issue as improper access control. An authenticated user who can create a Pentest Opportunity can set package_name to a value of their choosing in the autosave input. The report does not describe what package_name controls downstream, so the practical consequence beyond the stored, staff-only field being attacker-controlled is not stated. The severity assigned by the platform is medium (CVSS 5.2).
Fix
Based on the finding, the appropriate change is to stop accepting package_name from the autosave input for non-staff users, either by removing it from the input type used by the client or by enforcing a role check in the resolver so that only internal reviewing staff can set it.
Variants to test
- Other autosave or draft mutations on the same platform: add fields that appear in the submitted object but not in the visible form, and check whether they are accepted and persisted. A positive result is the field appearing in the stored object when it is reopened.
- Fields that are normally set by staff or by a later workflow stage: try setting them during autosave and again at submission, then read them back through the status query. A positive result is the client-supplied value surviving into the final record.
- GraphQL input types generally: compare the fields accepted by the input type against the fields the UI sends, looking for extra members that the server does not reject. A positive result is a successful mutation with no error node naming the unexpected field.
Hunting notes
This kind of bug tends to hide in autosave and draft endpoints, because they are built to accept partial objects and are often less strictly validated than the final submit path. The signal during recon is a GraphQL mutation whose input type contains fields the form never shows, especially fields whose names suggest internal review, pricing, packaging or status. The researcher completed the normal flow, submitted the form, and then reopened it to check the value through OpportunityStatusQuery. That read-back step is what turns a suspicious accepted parameter into a demonstrable access control issue.
What happened, in plain words
HackerOne runs a bug bounty platform. Companies that want their software tested can post a "Pentest Opportunity" through a form on the site. While someone is filling in that form, the website quietly saves a draft every so often, so that nothing is lost if the browser closes. That automatic saving is done by a small request the page sends to HackerOne's servers.
The researcher noticed that this automatic save request accepted an extra piece of information called package_name. According to the report, that field is supposed to be filled in only by HackerOne's internal reviewing staff when the form is finally submitted, not by the person filling in the form. By adding the field to the save request by hand, the researcher was able to set it to a value of their choosing.
That is the whole bug: a piece of data that should be controlled by staff could be controlled by an ordinary user. The platform classified it as improper access control, rated it medium with a CVSS score of 5.2, and the affected asset was hackerone.com. The report was disclosed on 19 June 2024.
Background you need first
A few ideas come up again and again below, so here they are from zero.
A web form and its draft saving. Think of a long online application form, like a job application. Some sites save what you have typed every few seconds, so that if your laptop dies you do not lose everything. The site does this by sending your half-finished answers to its server in the background, without you pressing anything. That background request is what this report is about.
API. An API is the way one piece of software talks to another. When your browser loads a page and the page needs data, it often asks the server through an API rather than reloading the whole page. A useful comparison is a restaurant: the menu and the waiter are the API, and the kitchen is the server. You do not walk into the kitchen yourself; you tell the waiter what you want, and the waiter brings it back.
GraphQL. GraphQL is a particular style of API. Instead of many different addresses (URLs) for different things, there is usually one address, and the browser sends a written request describing exactly which pieces of data it wants. Those written requests are called queries when they read data and mutations when they change data. A mutation is simply a request that says "please change something on the server".
Mutation input. A mutation usually carries a bundle of values called its input. You can picture the input as a paper form attached to the request: the server reads the fields on that paper and acts on them. If the server reads a field it should not trust from that paper, problems follow.
Intercepting proxy. A proxy is a program that sits between your browser and the website. An intercepting proxy, such as Burp, lets you pause each request on its way out, look at it, change it, and then let it continue. It is like a postal worker who lets you open and rewrite a letter before delivering it. This is how the researcher added the extra field.
Improper access control. Access control means deciding who is allowed to do what. A staff-only field is access control: only staff should be able to set it. When the server lets someone outside that group do the same thing, the access control is improper, which is the weakness class given to this report.
CVSS. CVSS is a standard scoring system for the seriousness of a security flaw. Scores run from 0 to 10; 5.2 is in the medium band.
Setting up
The researcher used a normal browser to fill in the Pentest Opportunity form, and Burp to pause and edit the traffic. The report describes no special role or permission beyond being able to create a new Pentest Opportunity and submit the form. So the setup is simply: an ordinary logged-in account, plus a tool that can intercept requests.
Finding it
While filling up the Pentest Opportunity form, the researcher watched the automatic save request go out. Its name is AutoSavePentestOpportunity, and the researcher saw that its input accepted a value called package_name. Setting "package_name": "premium_p80" in that input worked, even though, as the researcher states, that field should be set only by the internal reviewing staff when the form is submitted.
The thing that made this look wrong is the mismatch: the field is meant to be under staff control, yet the person filling in the form could set it. In access control terms, the server was trusting a value that arrived from the client side.
Exploitation
Step 1: Create a new Pentest
Start a new Pentest Opportunity so the form is open and the automatic saving is running. This step exists to get the autosave request to appear at all; without an open form there is nothing to intercept.
Step 2: Intercept the autosave request
Turn on interception in Burp and wait for the auto update function to begin. The request that shows up is the autosave mutation. The point of pausing here is to be able to edit the request before the server sees it.
Step 3: Inspect the mutation
The intercepted query looks like this:
mutation AutosavePentestOpportunity($input: AutosavePentestOpportunityInput!) {
autosavePentestOpportunity(input: $input) {
was_successful
errors(first: 100) {
edges {
node {
id
type
field
message
__typename
}
__typename
}
__typename
}
__typename
}
}
Line by line, in plain words:
mutation AutosavePentestOpportunity($input: AutosavePentestOpportunityInput!)declares a change request namedAutosavePentestOpportunity. It takes one bundle of values, called$input, whose shape is defined asAutosavePentestOpportunityInput. The exclamation mark means the bundle is required and cannot be left out.autosavePentestOpportunity(input: $input) {is the actual action: run the autosave using that bundle, and then return the following details about how it went.was_successfulasks the server to report whether the save worked, as a simple yes or no.errors(first: 100) {asks for any error messages, up to 100 of them. The wordfirstis a limit, like saying "give me the first 100".edges { node {is GraphQL's way of wrapping a list of items. Each item sits in anode.id,type,fieldandmessageare the details of each error: an identifier, a category, which form field the error concerns, and the human-readable text. Thefieldpart matters here, because it is what would tell the browser which input field was rejected.__typenameis a built-in GraphQL field that reports the name of the type of the thing being returned. It appears several times because each level of the response asks for it.- The closing braces simply close each block opened above.
So the request asks the server to save a draft and to tell the client, in detail, whether anything went wrong. The researcher's change targets one specific input field, and this error reporting is what would normally reveal a rejected field.
Step 4: Add the field to the input
Before forwarding the request, include this line in the input:
"package_name": "premium_p80"
This adds a package_name member to the autosave input, with the value premium_p80. The server accepted it. That acceptance is the heart of the finding: the client could write a field that is meant to be assigned by internal reviewing staff. The step was taken precisely to test whether the server checks who is allowed to set that field, and the answer was that it did not.
Step 5: Complete and submit the form
Finish filling in the form and submit it as normal. This step matters because it tests whether the injected value survives the normal submission, or whether the server throws it away at that later stage.
Step 6: Reopen the submitted form
Reopen the submitted form and check whether the OpportunityStatusQuery mutation shows the package_name field with the value set earlier. The step is to reopen the submitted form and check whether the OpportunityStatusQuery mutation shows the package_name field with the value set earlier. Reading the value back is what turns a suspicious accepted parameter into a demonstrable access control issue.
The report also references a proof of concept video for the full flow.
Why it worked
The autosave mutation accepts package_name as part of its input and applies it, without restricting that field to the internal reviewing staff who are supposed to set it on submission. In other words, the server trusts a field in the client-supplied input that should be server-controlled or limited by role. The report does not describe any server-side check that would have rejected the extra field. Whether the omission is in the input definition, the code that handles the request, or both is not stated; most likely the input type exposes the field and the handler writes it without an authorisation check.
Impact
The researcher classifies the issue as improper access control. An authenticated user who can create a Pentest Opportunity can set package_name to a value of their choosing in the autosave input. The report does not describe what package_name controls downstream, so the practical consequence beyond the stored, staff-only field being attacker-controlled is not stated. The severity assigned by the platform is medium (CVSS 5.2).
Fix
Based on the finding, the appropriate change is to stop accepting package_name from the autosave input for non-staff users, either by removing it from the input type used by the client or by enforcing a role check in the code that handles the request, so that only internal reviewing staff can set it.
Variants to test
- Other autosave or draft mutations on the same platform: add fields that appear in the submitted object but not in the visible form, and check whether they are accepted and persisted. A positive result is the field appearing in the stored object when it is reopened.
- Fields that are normally set by staff or by a later workflow stage: try setting them during autosave and again at submission, then read them back through the status query. A positive result is the client-supplied value surviving into the final record.
- GraphQL input types generally: compare the fields accepted by the input type against the fields the UI sends, looking for extra members that the server does not reject. A positive result is a successful mutation with no error node naming the unexpected field.
Hunting notes
This kind of bug tends to hide in autosave and draft endpoints, because they are built to accept partial objects and are often less strictly validated than the final submit path. The signal during recon is a GraphQL mutation whose input type contains fields the form never shows, especially fields whose names suggest internal review, pricing, packaging or status. The researcher completed the normal flow, submitted the form, and then reopened it to check the value through OpportunityStatusQuery. That read-back step is what turns a suspicious accepted parameter into a demonstrable access control issue.
Glossary
- API: the agreed way for one piece of software to ask another for data or actions, like a waiter carrying orders between you and the kitchen.
- Access control: the rules deciding who is allowed to do what; here, which fields only staff may set.
- Improper access control: a flaw where those rules are missing or too loose, so someone outside the intended group can do the action.
- GraphQL: a style of API where the client writes a request describing exactly which data it wants, using queries to read and mutations to change.
- Query: a GraphQL request that reads data without changing it.
- Mutation: a GraphQL request that changes data on the server.
- Input: the bundle of values attached to a mutation, which the server reads and acts on.
- Field: a single named piece of data, such as
package_nameorwas_successful. - Autosave: automatic background saving of a draft while a form is being filled in.
- Intercepting proxy: a tool such as Burp that sits between browser and server and lets you pause, inspect and edit requests.
- Burp: a common intercepting proxy used for web security testing.
- Request: the message a browser sends to a server asking it to do something.
- Server: the computer that stores data and answers requests.
- Client side: anything happening in the user's browser, which the user can control.
- Server side: anything happening on the server, which the user cannot directly control.
- Authenticated: logged in with a valid account.
- Role check: a server-side test of whether the logged-in user belongs to the group allowed to do something, such as staff.
- Resolver: the part of a GraphQL server that actually carries out a query or mutation.
- CVSS: a standard 0 to 10 score for how serious a security flaw is; 5.2 is medium.
- Severity: the overall seriousness rating given to a report.
- Proof of concept (POC): a demonstration, often a video or set of steps, showing the flaw really works.
- Recon: the exploratory phase of testing where you look for interesting behaviour before trying to exploit it.
- Endpoint: a specific address or action on a server that accepts requests.
- Parameter: a named value sent with a request, such as
package_name. - Persist: to be stored and remain in place after the request finishes.