How I Found My First $$ Bug on HackerOne (A Simple API Call Changed Everything)
An API endpoint for creating course-scoped API keys silently dropped the course restriction when the supplied course did not exist, creating a fully privileged key instead of a restricted one. An attacker with the ability to create such a key could gain broader access than intended, though the report does not demonstrate exploitation beyond key creation.
Published on medium.com
Bug Bounty
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
The target was a management platform with a large enterprise customer base, operating in HIPAA and PCI DSS territory. The author keeps the program name redacted per disclosure policy and refers to it as [REDACTED], to other assets as shared-[ASSET], and to the scoped object as course. The product exposes a fully documented REST API, has multiple asset tiers in scope, and provides a clear authenticated testing process.
The feature at the centre of the report is course-scoped API keys. The API supports creating a key restricted to a specific course, so that the key can only operate within that path. The documentation describes this as a delegation mechanism: a way to give a third-party integration or automation limited access without handing over full site privileges. The relevant endpoint is POST /api/rest/v1/api_keys, and the documented course (redacted) parameter is described as restricting the key's access to the named asset.
The front end was a React single-page app, so the real attack surface was the API underneath the HTML rather than the served markup.
Setup
The author opened HackerOne for the first time in two years and deliberately chose newer programs over long-running ones, on the reasoning that recently added programs have attack surfaces not yet exhausted by years of accumulated research. The chosen program had a documented REST API and multiple asset tiers in scope.
Testing was done in two phases:
- Unauthenticated enumeration before creating any account. This yielded little beyond the expected 401s on anything meaningful.
- Authenticated testing after following the program's instructions precisely, using a HackerOne alias as the work email.
Two accounts were created: a primary admin account and a second regular user with no elevated privileges, so that privilege escalation and IDOR could be tested with a distinct attacker and victim. The author played both roles.
About thirty minutes were spent clicking through the web UI to understand how the application presents itself to a normal user. The tooling was curl for direct HTTP requests against the API with full control over every field, plus python3 -m json.tool for reading responses.
Finding it
Two observations shaped the approach.
First, while reading the developer documentation, the author learned about course-scoped API keys and noted the delegation use case. The thought that stayed in mind was: what if the app does not work as documented?
Second, the UI showed only a filtered subset of what the API could do, and the program's own documentation acknowledged this directly:
"The API exposes functionality the UI does not. That is by design."
If the UI is a filtered view and the API accepts parameters the UI never sends, the interesting question becomes what happens when those parameters are sent directly. The documentation's description of the course parameter was treated as a contract, and therefore as a test case: it states exactly what the parameter should do, and so it also states what to look for when it does not do that.
Exploitation
Step 1: create a key scoped to a non-existent asset
Using the admin key, the author sent a creation request with permission_set set to full and course (redacted) set to shared-[ASSET]:
curl -s -X POST -H "[REDACTED]API-Key: $ADMIN_KEY" -H "Content-Type: application/json" \ -d '{ "name": "test-key", "permission_set": "full", "course (redacted)": "shared-[ASSET]", "user_id": [REDACTED] }' \ "$BASE/api/rest/v1/api_keys" | python3 -m json.tool
The request authenticates with the admin API key header, sets the JSON content type, and posts a key object with a name, a full permission set, the course restriction, and a user id. The response came back clean: no error, no validation failure, just the newly created key object.
Step 2: read the response field by field
Reading the returned object one field at a time surfaced this:
{ "id": [REDACTED], "name": "test-key", "permission_set": "full", "course (redacted)": null, ...}
The request had sent "course (redacted)": "shared-[ASSET]", and the API returned "course (redacted)": null. Not a different representation of the same value, not a normalised path format: null. The restriction that had been explicitly requested was silently dropped, and the key was created with no indication that anything had gone wrong.
Step 3: retest after the fix
The program shipped a fix and invited a retest, which the author ran immediately. The same creation request with the same non-existent asset path now returned correctly:
{ "id": [REDACTED], "name": "retest-nonexistent-course-key", "course": "nonexistent-asset-abc123", "permission_set": "full", "user_id": [REDACTED]}
The course was stored as submitted rather than dropped to null. Testing the key against endpoints then produced:
GET /api/rest/v1/redacted/-> 403 Api Key Is Course Restricted"Invalid course for the API key. The API key is only valid for course nonexistent-asset-abc123"
The restriction was enforced correctly even on an asset that does not exist yet.
Root cause
The root cause was not that course restrictions failed in general. It was specifically that when a request supplies a course pointing to an asset that does not yet exist on the site, the platform silently drops the restriction instead of storing it or returning an error. If the asset exists at creation time, the path is stored and enforced correctly. If it does not exist, the result is course: null.
The failure mode is subtle: a developer or administrator creates a key for an asset they are about to set up, or makes a typo in the course name, and walks away believing they have created a restricted key when they have actually created a fully privileged one. No error, no indication. The author describes it as a silent footgun built into the creation flow.
The web UI would not have surfaced this, because it does not expose key creation in a way that lets you observe the silent drop. Catching it required constructing the raw API request and reading the response field by field.
Impact
The result is a key created with permission_set: full and no course restriction, despite the caller having asked for one. The key was created with permission_set: full and no course restriction, despite the caller having asked for one, so whoever created it would believe it was restricted when it was not. The condition is that the course named at creation time does not exist on the site, whether because it has not been set up yet or because of a typo.
The author does not quantify further impact beyond this, and the report does not describe what was done with the unrestricted key during testing.
Fix
The program shipped a fix, and the retest confirms the behaviour: a course that does not exist is now stored as submitted rather than dropped to null, and requests made with the key are rejected with a 403 stating that the API key is course restricted and valid only for the named course. The author's assessment is that it was fixed cleanly.
Variants to test
- Other scoping parameters on key or token creation. Create a key or token with a scope pointing at an object that does not exist (a project, tenant, workspace, repository). A positive result is a successful creation response in which the scope field comes back null or absent while the permission set remains broad.
- Typos and near-miss identifiers. Submit a scope value that differs by one character from a real object. A positive result is silent acceptance with a dropped or defaulted scope rather than a validation error.
- Scope on update rather than create. Send the same non-existent scope through an update or patch endpoint for an existing key. A positive result is the scope being cleared or ignored while the key keeps its privileges.
- Enforcement after creation. For any key that does store a scope, call endpoints outside that scope. A positive result is a 2xx response where a 403 course-restricted error is expected.
- Documentation as a test case. For every documented restriction, delegation or sandboxing feature, send the raw API request the UI never sends and compare the stored object with what was requested. A positive result is any field whose returned value does not match the documented contract.
What the author took away
The bounty came in at $250 plus $50 rewarded for a retest.

Bug Bounty
The broader lesson is to read and understand how things are documented to work by the developer, and to validate whether there is broken access control. The finding came from reading the documentation like a contract, identifying a feature that established a documented trust boundary, and verifying whether the application honoured that boundary when interacted with directly through the API. When a program's documentation describes a feature that restricts access, that description is a test case.
What happened, in plain words
A security researcher found a bug in a company's website. The company lets its customers create special digital keys that are supposed to be limited to one small part of the site, called a course. The researcher asked the site to make one of these limited keys, but pointed it at a course that did not exist yet. Instead of refusing or complaining, the site quietly made the key with no limit at all. The key was created with full permissions and no course limit, even though the person who made it believed it was locked to one course. The company fixed it, the researcher checked the fix, and the researcher was paid $250 for the report plus $50 for checking the fix afterwards.
This article walks through that story from the beginning, explaining every technical idea as it comes up, so you can follow it even if you have never done security testing before.
How the researcher got here
In 2025 the researcher sent a direct message on LinkedIn to a senior security researcher. The message was not asking for a job or a favour; the researcher simply wanted to understand how someone reaches that level of skill. The reply was surprisingly simple advice: start with PortSwigger labs, then read write-ups on Medium and reports on HackerOne, and work with other bug bounty hunters.
There were no secret resources. The researcher practised the basics at odd hours, read disclosed HackerOne reports found through Medium write-ups, and took part in CTF challenges. A CTF, or capture the flag, is a practice competition where you solve security puzzles in a safe, fake environment. Over time the researcher could look at a vulnerability write-up and understand not just what happened but why.
Along the way the defensive side of security started to interest the researcher more: threat detection, log analysis, alert triage and incident response. That is the work of spotting and responding to attacks rather than carrying them out. Bug bounty, which is the practice of finding bugs in real companies' systems and reporting them for a reward, did not appeal at first. The scope documents, the legal requirements and the rules of engagement felt like a lot of paperwork.
That changed in September 2026, when offensive security skills became necessary for the researcher's situation. Practice labs felt too passive, so the researcher opened HackerOne for the first time in two years and started working on real programs.
Finding the right program
A program on HackerOne is a company's published offer: here are our systems, here are the rules, here is what we pay for valid reports. The researcher noticed that long-running programs, live for three, four or five years, felt almost impossible to break into. They had thousands of resolved reports and large communities of researchers looking at them constantly, so every obvious surface had probably already been examined.
So the researcher focused on newer programs, added recently, where the attack surface had not been exhausted by years of research. Attack surface means all the parts of a system that an outsider can interact with: web pages, forms, and in this case an API.
The chosen target was a management platform with a large enterprise customer base, in the kind of industry covered by HIPAA and PCI DSS. HIPAA is a United States law about protecting health information, and PCI DSS is a standard for handling payment card data. In other words, this was a product businesses trust with data they cannot afford to lose. It had a fully documented REST API, several asset tiers in scope, and a clear process for testing while logged in.
The program name is kept hidden under the disclosure policy, which is the program's rule about what a researcher may publish. The write-up calls the program [REDACTED], other assets shared-[ASSET], and the object being scoped course.
Starting without an account
Before creating an account, the researcher wanted to see what the application gives away to someone with no credentials at all. That is often where the cheapest wins are: pages that should require a login but do not, error messages that leak information, or public parts that behave differently from what you would expect.
The application was a React single-page app. React is a JavaScript library for building user interfaces, and a single-page app is a website that loads once and then updates itself in the browser instead of asking the server for a whole new page each time you click. The practical consequence is that the HTML you see is not where the interesting logic lives. The real attack surface is the API underneath it.
An API, short for application programming interface, is the set of addresses and rules a program uses to talk to another program. 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 order through the waiter, and the waiter brings back what the kitchen produced. When you use a website, your browser is constantly ordering from the kitchen through the API, and the pages you see are just the plated result.
So the researcher looked up the developer documentation and started reading it. Developer documentation is the instruction manual a company publishes for programmers who want to build on its API: which addresses exist, what each one expects, and what it returns.
While reading, the researcher learned that the API supported course-scoped API keys. An API key is a long secret string that a program sends along with each request to prove who it is, a bit like a membership card you show at the door. Scoped means limited: a course-scoped key is supposed to work only inside one specific course and nowhere else.
The documentation described this as a delegation mechanism, a way to give a third-party integration or automation limited access without handing over full site privileges. A third-party integration is another company's software that connects to this platform, for example a tool that automatically enrols students. You would not want to give such a tool the keys to the whole building, so you give it a key that opens one room.
The thought that stayed with the researcher was: what if the app does not work as documented? That question is worth keeping in mind for the rest of the article.
Looking around without logging in did not produce much beyond the expected 401s on anything meaningful. A 401 is the HTTP status code for "you are not authenticated", meaning the server is saying it does not know who you are. HTTP status codes are the short numbers a web server returns with every response: 200 means success, 403 means forbidden, 404 means not found, and so on. Seeing 401 where a login is required is normal and healthy.
It was time to get an account.
Setting up and noticing something about the interface
The researcher followed the program's instructions precisely, using a HackerOne alias as the work email. An alias is a forwarding address that hides your real email, which is useful when you do not want a company to know your personal details.
Once inside, the researcher created two accounts: a primary admin account, and a second regular user with no elevated privileges. The reason is that testing privilege escalation and IDOR properly requires an attacker and a victim, and here the researcher played both roles at once. Privilege escalation means getting more power than you were given. IDOR, short for insecure direct object reference, means reaching someone else's data by changing an identifier in a request, for example swapping your own record number for another user's.
About thirty minutes went into clicking through the web interface, just to get a feel for how the application presents itself to a normal user. That is when the researcher noticed something that reframed the whole approach.
The interface was showing only a filtered subset of what the API could actually do, and the program's own documentation said so directly:
"The API exposes functionality the UI does not. That is by design."
That sentence is effectively an invitation to stop using the browser and start talking to the API directly. If the interface is a filtered view, and the API accepts parameters the interface never sends, then the interesting question becomes what happens when you send those parameters yourself.
curl became the obvious tool for this. curl is a command-line program that sends HTTP requests and prints the raw response, giving you full control over every field. HTTP is the language browsers and servers use to exchange requests and responses. Using curl is like skipping the waiter and handing your order straight to the kitchen, so you can see exactly what comes back.
What the documentation promised
The researcher returned to a feature that had caught their attention during the documentation review, because the gap between what it promised and what could actually be verified had been sitting with them.
The endpoint was POST /api/rest/v1/api_keys. An endpoint is one specific address on an API, the equivalent of one dish on the menu. POST is the HTTP method used to create something new, as opposed to GET, which asks to read something.
The documented course (redacted) parameter was described clearly: set it to an asset name and the key's access would be restricted to that asset. A parameter is one named field in a request, like one line on an order form.
The documentation even spelled out the use case: create a defined key, hand it to a third-party integration, and that integration can only touch the asset you specified. Everything else on the site remains inaccessible to it.
This is a trust boundary. A trust boundary is a line the system promises not to let anyone cross, for example between "this integration may touch course A" and "this integration may touch everything". The right question to ask about any trust boundary is whether it actually holds when you push on it.
Testing it
The researcher sent this request:
curl -s -X POST -H "[REDACTED]API-Key: $ADMIN_KEY" -H "Content-Type: application/json" \ -d '{ "name": "test-key", "permission_set": "full", "course (redacted)": "shared-[ASSET]", "user_id": [REDACTED] }' \ "$BASE/api/rest/v1/api_keys" | python3 -m json.tool
Line by line, in plain words:
curl -sruns curl, and-smeans silent, so it does not print progress noise.-X POSTsays the request is a POST, the method for creating something.-H "[REDACTED]API-Key: $ADMIN_KEY"adds a header. Headers are extra pieces of information attached to a request, like the label on a parcel. This one carries the admin API key, the membership card that proves the researcher is allowed in.$ADMIN_KEYis a variable holding that secret value.-H "Content-Type: application/json"tells the server the body is formatted as JSON. JSON is a simple text format for structured data, using curly braces, names in quotes and values after colons.-d '{ ... }'is the body of the request, the actual order form. It asks for a key namedtest-key, withpermission_setset tofull, meaning full permissions, with the course restriction set toshared-[ASSET], and with auser_ididentifying the owner."$BASE/api/rest/v1/api_keys"is the address being called, where$BASEis the site's base address.| python3 -m json.toolpipes the response into a small Python tool that reformats JSON with indentation, so it is easier to read field by field.
The response came back clean: no error, no validation failure, just the newly created key object. The researcher read through the fields one by one and landed on this:
{ "id": [REDACTED], "name": "test-key", "permission_set": "full", "course (redacted)": null, ...}
In plain words: the key was created, it has an identifier, it is named test-key, and its permission set is full. But the course field came back as null. In JSON, null means "no value at all".
The request had sent "course (redacted)": "shared-[ASSET]", and the API had returned "course (redacted)": null. Not a different representation of the same value, not a normalised path format, just null. The restriction that had been explicitly requested had been silently dropped, and the key had been created with no indication that anything had gone wrong.
That is the bug. The researcher had asked for a key that opens one room, and the system had handed over a key that opens the whole building, without saying a word.
What was the trigger
The root cause was not that course restrictions failed in general. It was specifically that when you supply a course pointing to an asset that does not yet exist on the site, the platform silently drops the restriction instead of storing it or returning an error. If the asset exists at creation time, the path is stored and enforced correctly. If it does not exist, you get course: null.
That distinction matters. The failure mode is subtle: a developer or administrator creates a key for an asset they are about to set up, or makes a typo in the course name, and walks away believing they have created a restricted key when they have actually created a fully privileged one. No error, no indication. The researcher calls it a silent footgun built into the creation flow.
A footgun is a feature that makes it easy to shoot yourself in the foot: it accepts what you typed without complaint, and the mistake is easy to miss.
The fix and the retest
The program shipped a fix and invited the researcher to retest, which the researcher ran immediately. The same creation request, with the same non-existent asset path, now came back correctly:
{ "id": [REDACTED], "name": "retest-nonexistent-course-key", "course": "nonexistent-asset-abc123", "permission_set": "full", "user_id": [REDACTED]}
In plain words: this time the course field holds the value that was submitted, nonexistent-asset-abc123, instead of being dropped to null. The system now remembers the restriction even when the course does not exist yet.
Then the researcher tested the key against endpoints:
GET /api/rest/v1/redacted/-> 403 Api Key Is Course Restricted"Invalid course for the API key. The API key is only valid for course nonexistent-asset-abc123"
In plain words: a GET request, which asks to read something, was sent to an endpoint outside the key's course. The server answered with 403, the status code for forbidden, and a message saying the API key is course restricted and is only valid for the course named nonexistent-asset-abc123. The restriction was enforced correctly, even on an asset that does not exist yet.
Fixed cleanly.
What the researcher learned
The bounty came in at $250 plus $50 rewarded for a retest.

The image is captioned "Bug Bounty".
More importantly, it pays to read and understand how things are documented to work by the developer, and to check whether there is broken access control. Broken access control is the general name for bugs where the system lets someone do something they should not be allowed to do, because the check is missing, wrong or skippable.
The finding came from reading the documentation like a contract, identifying a specific feature that established a documented trust boundary, and then verifying whether the application honoured that boundary when you interacted with it directly through the API.
The web interface would never have surfaced this, because it does not expose key creation in a way that would let you observe the silent drop. It took constructing the raw API request and reading the response field by field to catch "course": null where "course": "shared-[ASSET]" should have been.
If there is one thing to pass on to someone starting out, it is this: when a program's documentation describes a feature that restricts access, that description is a test case. The documentation told the researcher exactly what the course parameter was supposed to do, which meant the documentation also told the researcher exactly what to look for when it did not do that.
Other places to look for the same pattern
- Other scoping parameters on key or token creation. Create a key or token with a scope pointing at an object that does not exist, such as a project, tenant, workspace or repository. A positive result is a successful creation response in which the scope field comes back null or absent while the permission set remains broad.
- Typos and near-miss identifiers. Submit a scope value that differs by one character from a real object. A positive result is silent acceptance with a dropped or defaulted scope rather than a validation error.
- Scope on update rather than create. Send the same non-existent scope through an update or patch endpoint for an existing key. A positive result is the scope being cleared or ignored while the key keeps its privileges.
- Enforcement after creation. For any key that does store a scope, call endpoints outside that scope. A positive result is a 2xx response where a 403 course-restricted error is expected. A 2xx response is any success code, such as 200.
- Documentation as a test case. For every documented restriction, delegation or sandboxing feature, send the raw API request the interface never sends and compare the stored object with what was requested. A positive result is any field whose returned value does not match the documented contract.
Glossary
- API: the set of addresses and rules one program uses to talk to another, like a menu and waiter between you and the kitchen.
- API key: a long secret string sent with requests to prove which program is calling, like a membership card.
- Attack surface: all the parts of a system an outsider can interact with.
- Broken access control: bugs where the system lets someone do something they should not be allowed to do.
- Bug bounty: a company's offer to pay people for finding and reporting bugs in its systems.
- Bounty: the reward paid for a valid report.
- Course-scoped: limited to one specific course and nothing else.
- CTF (capture the flag): a practice competition where you solve security puzzles in a safe environment.
- curl: a command-line program that sends HTTP requests and prints the raw response.
- Delegation mechanism: a way to give another program limited access without handing over full privileges.
- Disclosure policy: a program's rules about what a researcher may publish and when.
- Endpoint: one specific address on an API, like one dish on a menu.
- GET: the HTTP method used to ask to read something.
- Header: extra information attached to a request, like a label on a parcel.
- HIPAA: a United States law about protecting health information.
- HTTP: the language browsers and servers use to exchange requests and responses.
- HTTP status code: the short number returned with every response, such as 200 for success, 401 for not authenticated, 403 for forbidden, 404 for not found.
- IDOR (insecure direct object reference): reaching someone else's data by changing an identifier in a request.
- Incident response: the work of handling a security incident once it is detected.
- JSON: a simple text format for structured data, using curly braces, quoted names and values after colons.
null: in JSON, the value meaning "nothing at all".- Parameter: one named field in a request, like one line on an order form.
- PCI DSS: a standard for handling payment card data.
- POST: the HTTP method used to create something new.
- Privilege escalation: getting more power than you were given.
- Program: a company's published bug bounty offer, with its systems, rules and rewards.
- React: a JavaScript library for building user interfaces.
- REST API: an API built around addresses and standard HTTP methods such as GET and POST.
- Root cause: the underlying reason a bug happens, as opposed to its visible symptom.
- Scope: the boundary of what a key, a test or a program is allowed to touch.
- Single-page app: a website that loads once and updates itself in the browser instead of loading new pages.
- Third-party integration: another company's software connected to the platform.
- Threat detection: the work of spotting attacks as or after they happen.
- Trust boundary: a line the system promises not to let anyone cross.
- Unauthenticated: without logging in or proving who you are.
- Validation: the server checking that the values you sent make sense before acting on them.
- Vulnerability: a weakness in a system that can be used to make it behave in ways its owners did not intend.