Skip to content
Access control Write-up Beginner

How I Earned My First $5,000 Bug Bounty by Finding a Critical Au

A privileged backend function that performed database operations could be called without the expected authentication or authorisation context. An attacker could reach production data and potentially modify or destroy records through that function.

Rohith S Follow

Published on medium.com

Bug Bounty

Rohith S, on medium.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This is an account of a first paid bug bounty: $5,000 for a missing authentication and authorization boundary around a highly privileged backend function. , so the write-up describes the shape of the flaw rather than a reproducible target.

The feature involved is a backend function that appeared to perform a privileged database-related operation. The question that drove the whole finding was simple: who is actually allowed to call this function?

From the original on medium.com

Setup

The testing was carried out within an authorized security program. No specific accounts, roles, tools or versions are described. The application exposed API and backend functionality that could be reached and probed, including a function that looked like it performed a privileged database operation.

Finding it

The researcher began by mapping the application, identifying interesting API and backend functionality exposed by it. Among that surface was a function that appeared to perform a privileged database-related operation. That raised the central question of who is permitted to call it.

What made the finding notable was that no complicated exploit chain was needed. The root cause was a missing authentication and authorization boundary around the privileged backend function, and no complicated exploit chain was needed.

Exploitation

Step 1: Send a request without the expected authentication or authorization context

The researcher sent a request without the expected authentication or authorization context. Unexpectedly, the server still processed the request.

Step 2: Validate safely with a read-only request

To confirm that the backend was actually performing the operation, the researcher used a harmless, read-only request. The real request is intentionally redacted; the published form is:

Bash
curl -X POST "https://example.com/[REDACTED_FUNCTION]" \
 -H "Content-Type: application/json" \
 -d '{
 "[REDACTED_PARAMETER]": "[REDACTED_READ_ONLY_QUERY]"
 }'

This is a POST to the redacted function path with a JSON body carrying a single redacted parameter whose value is a read-only query. The corresponding database query is also sanitised:

SQL
SELECT [REDACTED_COLUMN_1],
 [REDACTED_COLUMN_2],
 [REDACTED_COLUMN_3],
 [REDACTED_COLUMN_4]
FROM [REDACTED_DATASET].[REDACTED_TABLE]
LIMIT 3;

The query selects four redacted columns from a redacted table in a redacted dataset, limited to three rows. The response returned legitimate production data, which confirmed that the backend was processing the request without the expected authorization.

The researcher states explicitly that all sensitive values are intentionally redacted and that the real endpoint, database identifiers, query, parameters and response data are not disclosed.

Root cause

The vulnerable backend function had access to a privileged production database, and a missing authorization check exposed it to an untrusted caller. The trust chain was:

Text
Unauthenticated Request → Privileged Backend Function → Production Database

As the researcher puts it, the issue was not simply that an API did not require authentication. The bigger problem was that a missing authorization check exposed a highly privileged backend capability to an untrusted caller. The report does not describe the code or configuration that should have enforced the check.

Impact

The function's access to a privileged production database created a potentially serious impact across all three security properties:

Property Potential impact
Confidentiality Unauthorized access to application data
Integrity Potential unauthorized insertion or modification of records
Availability Potential destructive database operations affecting application functionality

The impact described is therefore potential, conditioned on what the privileged function was capable of doing with its database access.

Fix

The report does not say which specific change was made. It states that the security team investigated and validated the vulnerability and that the issue was subsequently addressed through the responsible disclosure process. The researcher's recommended defensive measures for this class of issue are:

  1. Enforce authentication: privileged backend functions should never be anonymously accessible.
  2. Enforce server-side authorization: do not rely on the frontend or client to decide who can perform privileged operations.
  3. Apply least privilege: backend services should only have the database permissions they actually require.
  4. Do not expose database execution functionality to clients: expose narrowly defined application actions instead of generic database execution capabilities.
  5. Prefer short-lived credentials: avoid unnecessary long-lived static credentials for privileged services.
  6. Monitor privileged operations: log and alert on unusual access to sensitive backend functionality.

Variants to test

  1. Privileged functions reachable without credentials. Strip the session cookie, bearer token or API key from requests to backend functions that look administrative or database-related. A positive result is a response that still processes the operation rather than returning an authentication error.
  2. Authenticated but unauthorized callers. Repeat the same requests with a low-privilege account. A positive result is a privileged operation succeeding for a user who should not hold that permission.
  3. Generic database execution surfaces. Look for parameters that accept query fragments, table names or dataset identifiers.
  4. Service-to-service trust assumptions. Probe endpoints that appear to be intended for internal callers only. A positive result is the backend treating an external request as trusted.
  5. Excessive database permissions. Where a function is legitimately reachable, check whether its database identity can do more than the feature needs. A positive result is a read-only feature whose database identity holds more permissions than the feature needs.
  6. Monitoring gaps. Check whether privileged operations are logged and alerted on. A positive result is sensitive backend activity that leaves no trace.

The lesson the researcher draws is to ask not only whether an endpoint can be accessed, but what it can do if it should not be accessible at all.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher found a serious flaw in a company's website or app and was paid $5,000 for reporting it. The flaw was not a clever chain of tricks.

Think of a hotel. The front desk should check your key card before letting you into the staff-only room where the master keys are kept. Here, the door to that room was unlocked: a request without the expected authentication or authorization context was still processed.

So what follows describes the shape of the problem, not a target you can copy. That is normal and responsible: the point is to teach the lesson, not to hand out a map.

From the original on medium.com

The words you need first

Before the steps, a few everyday ideas. You do not need to memorise them; come back when a term appears.

  • Server: the computer, somewhere else, that runs a website or app and holds its data. Your browser asks it questions and it answers.
  • API: a way for one piece of software to talk to another. If a website is a restaurant menu, the API is the waiter: you say what you want in a fixed way, and the waiter carries the request to the kitchen and brings back the result. Apps and websites use APIs constantly, often without you noticing.
  • Backend: the part of the system you never see, running on the server. The frontend is what you see in the browser.
  • Function: a named action the backend can perform, like "look up this record" or "save this change".
  • Database: the organised store of information behind an app: user records, orders, messages, and so on.
  • Query: a request to the database, written in a special language, asking it to fetch or change something.
  • Authentication: proving who you are. Logging in with a password is authentication.
  • Authorization: what you are allowed to do once you are known. A logged-in customer and a logged-in administrator are both authenticated, but only the administrator is authorized to change other people's accounts.
  • Session cookie or token: a small piece of data your browser keeps after you log in and sends with each request, so the server recognises you. It works like a wristband at an event: show it and you get in without queueing again.
  • Privileged: having extra power. A privileged function can do things ordinary users cannot.
  • Read-only: can look but cannot change anything. Like reading a noticeboard rather than writing on it.
  • Production: the live system real people use, as opposed to a test copy.
  • Redacted: hidden on purpose, usually by replacing the sensitive part with a placeholder.
  • Proof of concept: a small, safe demonstration that the problem is real.

The setup

This matters: testing someone's systems without permission is not research, it is unauthorised access.

The report does not describe specific accounts, tools or software versions. The application exposed API and backend functionality that could be reached and examined, including one function that looked like it performed a privileged database operation.

Finding it

Step 1: Map the application

The researcher started by mapping the application: working out what API and backend functionality it exposed. This is like walking around a building and noting the doors before trying any of them. You cannot test what you have not noticed.

Step 2: Investigate an unusual backend function

Among that surface was a function that appeared to perform a privileged database-related operation. In other words, it looked like a function that could perform a privileged database-related operation.

That immediately raised the central question of the whole finding: who is actually allowed to call this function? Not "what does it do", but "who should be able to ask it to do that".

Step 3: Test the authorization boundary

The researcher sent a request without the expected authentication or authorization context.

Unexpectedly, the server still processed the request. The door let the request through without the expected proof of identity.

Step 4: Validate safely with a read-only request

A single odd response is not proof. To confirm the backend was really doing the work, the researcher used a harmless, read-only request: something that could look at data but not change it. This is the difference between testing whether a door opens and actually taking anything out of the room.

The real request is intentionally redacted. The published form is:

Bash
curl -X POST "https://example.com/[REDACTED_FUNCTION]" \
 -H "Content-Type: application/json" \
 -d '{
 "[REDACTED_PARAMETER]": "[REDACTED_READ_ONLY_QUERY]"
 }'

Line by line:

  • curl is a command-line tool for sending web requests. It is the same kind of request your browser makes, just typed out instead of clicked.
  • -X POST says this is a POST request. A POST is the kind of request used to send something to the server, rather than just ask for a page.
  • "https://example.com/[REDACTED_FUNCTION]" is the address being called. example.com is a placeholder domain, and the function name is hidden.
  • -H "Content-Type: application/json" is a header: a note attached to the request telling the server what format the body is in. Here it says the body is JSON, a common text format for structured data.
  • -d '...' is the body of the request, the actual content being sent. It contains one parameter, whose name is hidden, and whose value is a read-only query, also hidden.

The corresponding database query is also sanitised:

SQL
SELECT [REDACTED_COLUMN_1],
 [REDACTED_COLUMN_2],
 [REDACTED_COLUMN_3],
 [REDACTED_COLUMN_4]
FROM [REDACTED_DATASET].[REDACTED_TABLE]
LIMIT 3;

Line by line:

  • SELECT is the database instruction for "fetch these things".
  • The four [REDACTED_COLUMN_...] entries are the fields being fetched, such as a name or a date. Their real names are hidden.
  • FROM [REDACTED_DATASET].[REDACTED_TABLE] says where to fetch from: a table inside a dataset. Both names are hidden.
  • LIMIT 3; caps the result at three rows. This is the safety part: fetch a tiny sample, not the whole store.

The response returned legitimate production data. That confirmed the backend was processing the request without the expected authorization: real records came back, so the function really had run.

The researcher states explicitly that all sensitive values are intentionally redacted, and that the real endpoint, database identifiers, query, parameters and response data are not disclosed.

Why it was critical

The vulnerable backend function had access to a privileged production database, and a missing authorization check exposed it to an untrusted caller. The chain of trust looked like this:

Text
Unauthenticated Request → Privileged Backend Function → Production Database

Read it left to right: a request from someone who has not proved who they are reaches a function with special powers, and that function can reach the live database. Each arrow is a step where a check could have stopped the request.

As the researcher puts it, the issue was not simply that an API did not require authentication. The bigger problem was that a missing authorization check exposed a highly privileged backend capability to an untrusted caller. The report does not describe the code or configuration that should have enforced the check.

The impact

Because the function could reach a privileged production database, the potential damage covered all three classic security properties:

Property Potential impact
Confidentiality Unauthorized access to application data
Integrity Potential unauthorized insertion or modification of records
Availability Potential destructive database operations affecting application functionality

In everyday terms: confidentiality is keeping secrets secret, so the worry is someone reading data they should not see. Integrity is keeping data correct, so the worry is someone adding or changing records. Availability is keeping the service working, so the worry is someone deleting or breaking things so the app stops functioning.

The impact described is therefore potential: it depends on what the privileged function was capable of doing with its database access, not on damage that was actually caused.

The fix

It states that the security team investigated and validated the vulnerability, and that the issue was subsequently addressed through the responsible disclosure process.

The researcher's recommended defensive measures for this class of issue are:

  1. Enforce authentication: privileged backend functions should never be anonymously accessible. Check who is calling before doing the work.
  2. Enforce server-side authorization: do not rely on the frontend or client to decide who can perform privileged operations. The browser can be changed by anyone; the server cannot.
  3. Apply least privilege: backend services should only have the database permissions they actually require. Give the key to the storeroom, not the whole building.
  4. Do not expose database execution functionality to clients: expose narrowly defined application actions instead of generic database execution capabilities. Offer "show my last three orders", not "run any query you like".
  5. Prefer short-lived credentials: avoid unnecessary long-lived static credentials for privileged services. A pass that expires is less useful to an attacker than one that works forever.
  6. Monitor privileged operations: log and alert on unusual access to sensitive backend functionality. If someone does get in, you want to know.

The disclosure itself included a safe proof of concept, the technical root cause, the security impact, a severity assessment and remediation recommendations.

Variants worth testing

The same idea shows up in several shapes. These are the patterns to look for:

  1. Privileged functions reachable without credentials. Remove the session cookie, bearer token or API key from requests to backend functions that look administrative or database-related. A positive result is a response that still processes the operation rather than returning an authentication error.
  2. Authenticated but unauthorized callers. Repeat the same requests with a low-privilege account. A positive result is a privileged operation succeeding for a user who should not hold that permission.
  3. Generic database execution surfaces. Look for parameters that accept query fragments, table names or dataset identifiers. A positive result is a read-only query returning real records, as happened here.
  4. Service-to-service trust assumptions. Probe endpoints that appear to be intended for internal callers only. A positive result is the backend treating an external request as trusted.
  5. Excessive database permissions. Where a function is legitimately reachable, check whether its database identity can do more than the feature needs. A positive result is a read-only feature whose database identity holds more permissions than the feature needs.
  6. Monitoring gaps. Check whether privileged operations are logged and alerted on. A positive result is sensitive backend activity that leaves no trace.

What the researcher took away

The lesson is to ask not only whether an endpoint can be accessed, but what it can do if it should not be accessible at all. A door that opens is interesting; a door that opens onto a privileged backend function is the finding.

Glossary

  • API: a fixed way for software to talk to other software, like a waiter taking your order to the kitchen.
  • Authentication: proving who you are, usually by logging in.
  • Availability: the security property of keeping a service working and reachable.
  • Backend: the unseen part of a system that runs on the server.
  • Confidentiality: the security property of keeping data secret from those who should not see it.
  • Cookie: a small piece of data a browser stores and sends back to a site, often used to recognise a logged-in user.
  • Credentials: the proof of identity a system accepts, such as a password, cookie or key.
  • curl: a command-line tool for sending web requests.
  • Database: an organised store of information behind an application.
  • Dataset: a named grouping of tables in a database.
  • Endpoint: a specific address on a server that accepts requests.
  • Frontend: the part of a system you see and interact with in the browser.
  • Function: a named action a backend can perform.
  • Header: extra information attached to a web request or response, such as the format of the body.
  • Integrity: the security property of keeping data correct and unaltered by unauthorised parties.
  • JSON: a common text format for structured data, used in request and response bodies.
  • Least privilege: giving a system or person only the permissions it actually needs.
  • Parameter: a named value sent with a request.
  • POST: a type of web request used to send data to a server.
  • Privileged: having extra power beyond an ordinary user.
  • Production: the live system used by real people.
  • Proof of concept: a small, safe demonstration that a problem is real.
  • Query: a request to a database to fetch or change data.
  • Read-only: able to view but not change data.
  • Redacted: hidden on purpose, usually replaced with a placeholder.
  • Responsible disclosure: reporting a flaw privately to the owner and giving them time to fix it before details are shared.
  • SELECT: the database instruction for fetching data.
  • Server: the remote computer that runs a service and holds its data.
  • Session: the period during which a server recognises you as logged in.
  • Token: a piece of data used as proof of identity or permission, sent with requests.
  • Trust chain: the sequence of steps a request passes through, each of which should check whether it should continue.

More by Rohith S

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.