Skip to content
IDOR Disclosed report Beginner

IDOR while uploading ████ attachments at [█████████]

An IDOR flaw in the attachment upload feature let an attacker supply another user's identifier and have files stored in that user's section when it was empty. Combined with a race condition, the text claims this could reach every newly created section.

rook1337 Follow

Originally disclosed on HackerOne

  • Disclosed after 48 days

Description: There is an IDOR vulnerability in uploading attachments to the ████ section where an attacker can upload attachments in other user's █████████ if there is no attachment uploaded by a user. If this vulnerability will be used with a Race condition, it can allow an attacker to upload attachments in all-new █████████ created by users.

Impact

A user can upload attachments to other users ███.

System Host(s)

██████

Affected Product(s) and Version(s)

CVE Numbers

Steps to Reproduce

  1. Go to ██████
  2. Login
  3. Go to https://███/█████
  4. Add a new █████████ and upload an attachment with that and submit it.
  5. Send the request to the repeater.

████ 6. Change the ███Id parameter value to the victim user's ██████████ id.

█████████ 7. Click on the send button and you will see success in response. 8. It will be uploaded in the victim user █████ section.

Suggested Mitigation/Remediation Actions

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

This is a disclosed HackerOne report against a U.S. Department of Defence program, rated high severity and filed under Insecure Direct Object Reference (IDOR). The researcher, rook1337, describes a flaw in the attachment upload flow of a section whose name is redacted in the text. The affected hosts, product names and versions are all redacted, and the report lists no CVE number and no bounty figure.

The claim is narrow and specific: an attacker can upload an attachment into another user's record when that record does not yet have an attachment of its own. The researcher adds that combining the flaw with a race condition would allow an attacker to place attachments into every newly created record belonging to users.

The reproduction steps are as follows:

  1. Go to the redacted application.
  2. Log in.
  3. Go to https://███/█████.
  4. Add a new record (the type is redacted) and upload an attachment with it, then submit.
  5. Send the resulting request to the repeater.
  6. Change the ███Id parameter value to the victim user's identifier.
  7. Click send and observe success in the response.
  8. The attachment is then uploaded into the victim user's section.

The report does not include the raw HTTP request or response, only the description of the parameter to change and the success string returned. The impact statement is a single sentence: a user can upload attachments to other users' records. No remediation detail is given beyond the section heading, and the report does not say how or when the issue was fixed.

Root cause

The report shows that changing the ███Id parameter to the victim's identifier and resending the request returns success. The ███Id parameter, which names the record the attachment belongs to, is taken from the request and used without checking that the authenticated user owns that record. The researcher notes the attack works when the victim has no attachment yet, without explaining why. The researcher notes that combining the flaw with a race condition would allow attachments in all newly created records.

Impact

Within the report's own framing, the impact is unauthorised writing: an attacker can place an attachment into another user's record. The researcher hedges the wider case with the race condition, saying it "can allow" an attacker to upload attachments in all-new records created by users. The report does not describe what an attachment can contain, whether it is later served to the victim, or whether it can overwrite existing data, so the practical consequences beyond the write itself are not established in the text.

How this kind of bug works

IDOR appears when an application uses an identifier from the request to select a database object and authorises the action against the session rather than against that object. The user is authenticated, the request is well formed, and the server happily performs the operation on whatever row the identifier names. Object-level authorisation is the missing piece: the handler must confirm that the object referenced belongs to the caller, or that the caller holds a role permitting access to it.

Upload endpoints are a common home for this because the identifier often arrives in a multipart body or a query string alongside the file, and developers focus on validating the file rather than the parent object. State-dependent logic makes it worse: a check such as "this record has no attachment yet" may be evaluated separately from the insert, opening a window for concurrent requests.

The defences are ownership checks on every object reference, ideally enforced centrally rather than per handler, plus atomic conditional writes so that a state check and the insert happen in one operation. Indirect reference maps, where the client sees an opaque token rather than a database key, reduce the attack surface but do not replace authorisation.

How to test for it

  1. Map the feature. Find every request that creates, updates or attaches something to an object: uploads, comments, profile fields, saved items. Note each identifier in the path, query string or body.
  2. Create two accounts, A and B, and populate B with at least one object of the relevant type. Record B's identifiers.
  3. Perform the action as A against A's own object and capture the request. Replay it with B's identifier substituted, keeping A's session cookie and any CSRF token valid for A.
  4. Compare responses. A positive result is a success status or body where the object belongs to B, confirmed by logging in as B and seeing the change. A generic error, a redirect to login, or a 403 indicates the check is present.
  5. Test state variations: objects with no children yet, objects in draft, archived or deleted states, and objects owned by a user in a different role.
  6. For race conditions, send several identical requests in parallel against a freshly created object and look for more than one successful write.

Common false positives: the endpoint returns success but silently discards the write; the identifier is validated but the error message is misleading; the object is actually shared or public by design; or the response is cached from the attacker's own earlier request. Always verify from the victim account.

How it is fixed

Enforce object-level authorisation on the server for every identifier taken from a request, checking ownership or role before the write. Scope database queries by the authenticated user rather than filtering afterwards. Make state checks and writes atomic, for example with a conditional insert or a transaction with appropriate locking, so concurrent requests cannot both pass a check. Return a generic error for unauthorised object references, and log repeated failures as a signal of probing.

Hunting notes

Look at features where an object is created and then has things attached to it: support tickets, orders, projects, medical or HR records, and anything with a parent-child relationship in the URL or body. Multipart uploads, JSON bodies with nested identifiers, and GraphQL mutations that take an id argument are all worth probing. Recon signals include numeric or UUID identifiers that appear in more than one endpoint, identifiers that change between environments, and API documentation listing object parameters without scopes.

To make a report land, demonstrate the write from the victim's side with a before-and-after view, state clearly which account performed the action, and keep the proof minimal. If the impact depends on a race, show the concurrent requests and the resulting duplicate or unexpected writes rather than asserting the possibility.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 8 min read.

What happened, in plain words

This is a bug bounty report from HackerOne, filed against a U.S. Department of Defence program. It was rated high severity and disclosed on 30 June 2021. The researcher, rook1337, found a flaw in the way attachments are uploaded to a section of the application whose name is hidden in the text. The affected hosts, product names and versions are also hidden, and the report lists no CVE number and no bounty amount.

To follow the report you need a few everyday ideas first.

  • An application here is a website with user accounts. Each user logs in and sees their own records.
  • A record is one item a user creates, for example a form, a ticket or a profile entry. The report hides what kind of record it is.
  • An attachment is a file uploaded and stored alongside a record.
  • A request is the message your browser sends to the server when you click a button or submit a form. It contains the address, the data you typed, and a cookie, which is a small piece of data the server gave your browser at login so it can recognise you on later requests.
  • An identifier (often called an ID) is a number or code that names one specific record in the server's database, the way a house number names one house on a street.
  • An IDOR (Insecure Direct Object Reference) is a bug where the server takes an identifier straight from the request and acts on whatever record it names, without checking that the person making the request is allowed to touch that record. The comparison: a hotel receptionist who hands out a room key to anyone who says a room number, without checking that the guest is booked into that room.
  • A race condition is a timing problem. Two requests arrive so close together that the server checks something for both of them before either has finished, and both get through a check that should have stopped one.

The claim in the report is narrow. An attacker can upload an attachment into another user's record, but only when that record does not already have an attachment of its own. The researcher adds that if the flaw is combined with a race condition, an attacker could place attachments into every newly created record belonging to users.

The impact statement is one sentence: a user can upload attachments to other users' records.

The reproduction steps are:

  1. Go to the redacted application.
  2. Log in.
  3. Go to https://███/█████.
  4. Add a new record (the type is redacted) and upload an attachment with it, then submit.
  5. Send the resulting request to the repeater.
  6. Change the ███Id parameter value to the victim user's identifier.
  7. Click send and observe success in the response.
  8. The attachment is then uploaded into the victim user's section.

Step by step, here is why each one matters.

Step 4 creates a normal, legitimate upload so that the browser produces a real request. That request is the template the attacker will tamper with.

Step 5 moves the request into a repeater, a tool that lets you capture a request, edit it and send it again as many times as you like. Without a repeater you would have to redo the whole form each time; with one, you can change a single value and resend.

Step 6 is the heart of the attack. The ███Id parameter is the identifier that tells the server which record the attachment belongs to. The attacker leaves their own login cookie in place, so the server still believes the request comes from the attacker, but swaps the identifier for the victim's. If the server checked ownership, it would refuse. The report shows the request succeeding instead.

Step 7 is the confirmation. The server answers success, meaning it accepted the write. Step 8 is the consequence: the file now sits in the victim's section.

The report does not include the raw request or response, only the name of the parameter to change and the success string. It gives no remediation detail beyond the section heading, and it does not say how or when the issue was fixed.

In general, how this kind of bug works

IDOR appears when an application uses an identifier from the request to pick a database object, and then authorises the action against the session rather than against that object. The user is logged in, the request is well formed, and the server performs the operation on whatever row the identifier names. What is missing is object-level authorisation: the handler must confirm that the object belongs to the caller, or that the caller holds a role that permits access to it.

Upload endpoints are a common home for this because the identifier often arrives in a multipart body or a query string next to the file, and developers concentrate on validating the file rather than the parent object. State-dependent logic makes it worse: a check such as "this record has no attachment yet" may be evaluated separately from the insert, which opens a window for concurrent requests. The researcher mentions that combining the flaw with a race condition would extend it to all-new records.

The defences are ownership checks on every object reference, ideally enforced centrally rather than in each handler, plus atomic conditional writes so that a state check and the insert happen in one operation. Indirect reference maps, where the client sees an opaque token rather than a database key, reduce the attack surface but do not replace authorisation.

How to test for it

  1. Map the feature. Find every request that creates, updates or attaches something to an object: uploads, comments, profile fields, saved items. Note each identifier in the path, query string or body.
  2. Create two accounts, A and B, and populate B with at least one object of the relevant type. Record B's identifiers.
  3. Perform the action as A against A's own object and capture the request. Replay it with B's identifier substituted, keeping A's session cookie and any CSRF token valid for A.
  4. Compare responses. A positive result is a success status or body where the object belongs to B, confirmed by logging in as B and seeing the change. A generic error, a redirect to login, or a 403 indicates the check is present.
  5. Test state variations: objects with no children yet, objects in draft, archived or deleted states, and objects owned by a user in a different role.
  6. For race conditions, send several identical requests in parallel against a freshly created object and look for more than one successful write.

Common false positives: the endpoint returns success but silently discards the write; the identifier is validated but the error message is misleading; the object is actually shared or public by design; or the response is cached from the attacker's own earlier request. Always verify from the victim account.

How it is fixed

Enforce object-level authorisation on the server for every identifier taken from a request, checking ownership or role before the write. Scope database queries by the authenticated user rather than filtering afterwards. Make state checks and writes atomic, for example with a conditional insert or a transaction with appropriate locking, so concurrent requests cannot both pass a check. Return a generic error for unauthorised object references, and log repeated failures as a signal of probing.

Hunting notes

Look at features where an object is created and then has things attached to it: support tickets, orders, projects, medical or HR records, and anything with a parent-child relationship in the URL or body. Multipart uploads, JSON bodies with nested identifiers, and GraphQL mutations that take an id argument are all worth probing. Recon signals include numeric or UUID identifiers that appear in more than one endpoint, identifiers that change between environments, and API documentation listing object parameters without scopes.

To make a report land, demonstrate the write from the victim's side with a before-and-after view, state clearly which account performed the action, and keep the proof minimal. If the impact depends on a race, show the concurrent requests and the resulting duplicate or unexpected writes rather than asserting the possibility.

Glossary

  • Application: a website with user accounts and features behind a login.
  • Record: one item a user creates and owns, such as a form or ticket.
  • Attachment: a file uploaded and stored alongside a record.
  • Request: the message a browser sends to a server when you submit a form or click a button.
  • Response: the message the server sends back, such as a page or the word success.
  • Cookie: a small piece of data stored by the browser and sent with each request so the server can recognise your session.
  • Session: the server's memory of who is logged in, tied to a cookie.
  • Identifier (ID): a number or code that names one specific record in a database.
  • Parameter: a named value inside a request, such as ███Id.
  • IDOR (Insecure Direct Object Reference): a bug where the server acts on an identifier from the request without checking the caller is allowed to access that object.
  • Object-level authorisation: a check that the specific object being touched belongs to the caller or that the caller has a role permitting access.
  • Race condition: a timing flaw where two requests are processed so closely that a check is passed twice when it should have stopped one.
  • Repeater: a tool that captures a request so you can edit and resend it repeatedly.
  • Multipart body: the format a request uses to carry a file upload together with other fields.
  • CSRF token: a value added to requests to prove they came from the application's own pages, not from another site.
  • 403: the HTTP status code meaning the server understood the request but refused to authorise it.
  • Atomic: done as a single indivisible operation, so nothing can slip in between a check and the write.
  • UUID: a long random-looking identifier used instead of a simple number.
  • GraphQL mutation: a request in the GraphQL API style that changes data on the server.
  • CVE: a public catalogue number for a known security vulnerability.
  • HackerOne: a platform where researchers report vulnerabilities to organisations and reports can be disclosed publicly.

More by rook1337

View all

3 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.