IDOR leading unauthenticated attacker to download documents discloses PII of users and soldiers via https://www.█████████/Download.aspx?id= [HtUS]
An endpoint that serves documents by a numeric identifier did not check who was asking, so anyone could change the number and receive other people's files. An unauthenticated attacker could download contracts, tax documents and personal data such as addresses, phone numbers and emails, including information about soldiers.
Originally disclosed on HackerOne
- Triaged in 17 hours
- Fixed in 45 days
- Paid in 22 hours
- Disclosed after 24 months
Summary:
Hey team, I have found this API endpoint leads to leaking attachments and documents of users. The attachments leaked are banks taxes, contracts, PII such as full address and mobile number, emails, etc. The vulnerable URL is at [https://www.████████/Download.aspx?id=4675]
##Steps To Reproduce: [add details for how we can reproduce the issue]
- Go to this URL [https://www.█████████/Download.aspx?id=4675]
- Add any desired id
- then you will see a variety of sensitive files and contracts which contain PIIs and other classified documents
Impact
An unauthenticated attacker is able to obtain PII of users and soldiers also an attacker is able to leak classified documents
What the report shows
The target is a U.S. Department of Defence web application that serves downloadable documents through a handler named Download.aspx. The researcher found that the download endpoint takes the document identifier directly from the query string and returns the corresponding file without any authentication or authorisation check. The vulnerable URL given in the report is:
https://www.████████/Download.aspx?id=4675
The report describes the exposed material as attachments and documents belonging to users: bank and tax records, contracts, and PII such as full address, mobile number and email addresses. It also states that classified documents are reachable through the same endpoint.
The reproduction steps are short and consist of changing the identifier:
- Go to the URL
https://www.█████████/Download.aspx?id=4675. - Add any desired id.
- Observe a variety of sensitive files and contracts containing PII and other classified documents.
The report does not include the actual responses, file names, headers or a list of valid identifiers, so the exact contents of any returned document are not shown here. The researcher classifies the issue as an Insecure Direct Object Reference and states that an unauthenticated attacker can obtain PII of users and soldiers and can leak classified documents.
The platform records the report as high severity with a CVSS score of 7.5, a bounty of 500.00 USD, and disclosure on 2024-06-27. The report text itself does not describe a fix or a retest.
Root cause
The likely root cause is that Download.aspx uses the id query parameter as the sole key for retrieving a file and performs no check that the requester is authenticated or entitled to that document. The identifier is supplied by the client, so the object reference in the request maps directly to a stored file. An anonymous request returns the file, so no session or ownership check appears to be applied.
Impact
As the report frames it, an unauthenticated attacker can enumerate identifiers and retrieve documents that were never meant to be public. The material described includes tax and bank records, contracts, and PII such as full addresses, mobile numbers and email addresses, plus documents the report calls classified. That combination exposes personal data and documents the report calls classified. The report does not quantify how many documents are exposed or whether the identifiers are strictly sequential.
How this kind of bug works
An IDOR occurs when an application exposes a reference to an internal object (a database row, a file, an order, an invoice) and relies on the client to supply that reference, but never verifies on the server that the caller may access the object it names. The reference can be a numeric id, a UUID, a file name or a path segment. Numeric and sequential identifiers are the easiest to walk; UUIDs raise the cost of guessing but do not fix the flaw, because a leaked or shared UUID still grants access to anyone who holds it.
The defect is an authorisation failure, not an authentication failure, although in this report the endpoint is also reachable without a session. The server knows which object is requested but not who is asking, or it knows who is asking and does not compare that identity with the object's owner or access list. Defences are therefore server-side: derive the object from the authenticated principal (for example, list only documents owned by the current user), check an explicit permission on every request, and avoid exposing raw internal identifiers where a scoped reference or signed, expiring token can be used instead.
How to test for it
- Map endpoints that return objects by identifier: download handlers, invoice and receipt views, attachment and avatar paths, export and report generators, API resources such as
/api/users/{id}or/documents/{id}. - Create two accounts at the same privilege level and, where possible, an account at a different level. Populate each with at least one object you own.
- Capture requests for your own objects and note the identifier format: sequential integer, UUID, hash, file name, or a composite such as
idplususerId. - Replay the request with the other account's identifier, then with identifiers that do not belong to you (increment, decrement, or substitute a known value from another account). Do this both with a valid session and with no session at all, since missing authentication is a separate failure from missing authorisation.
- Try the same substitution in body parameters, path segments, headers and cookies, not only the query string, and check whether removing or swapping a token changes the result.
- A positive result is a response that returns another user's object or a file you should not see: matching content, a successful status, or a download with the other party's data. A negative result is a consistent 401, 403 or 404, or a redirect to a login or error page.
Common false positives: the endpoint returns a generic error page with HTTP 200, so check the body rather than the status code alone; the object is genuinely public (a published brochure, a shared template); the identifier belongs to your own account because of caching or a stale session; or the response is a placeholder that contains no real data. Confirm impact by showing that the retrieved content is sensitive and belongs to someone else, and avoid downloading more records than needed to prove the point.
How it is fixed
- Enforce authentication on the handler and reject anonymous requests before any file lookup.
- Perform an authorisation check on every request: resolve the object, then confirm the current principal owns it or holds a role that permits access.
- Prefer server-side scoping, such as querying documents by the authenticated user's identity rather than by a client-supplied id.
- Where direct references must remain, use unguessable identifiers and, better, signed or expiring tokens tied to the user and the object.
- Return a uniform 404 or 403 for objects the caller may not see, so the response does not confirm that an identifier exists.
- Log and rate-limit download requests to make enumeration detectable.
Hunting notes
This class hides wherever an application stores per-user files or records and exposes them by key: document and attachment handlers, invoice and statement downloads, support ticket attachments, HR and payroll portals, and mobile API endpoints that mirror web resources. Recon signals include numeric or short identifiers in URLs, parameters named id, file, doc, attachment or download, handlers with extensions such as .aspx that stream files, and endpoints that respond without a session cookie. Comparing responses across two accounts, and checking whether an unauthenticated request behaves like an authenticated one, is usually enough to find the flaw.
To get a report accepted, show the smallest reproducible request, the response proving the data belongs to another party, and a clear statement of who is affected. Redact the sensitive content in screenshots, stop at the first confirmed record, and describe the business impact in terms the program cares about: exposed PII, regulatory exposure, or access to internal documents. If the endpoint is unauthenticated, say so explicitly, because that raises severity beyond a same-role IDOR.
What happened, in plain words
A security researcher looked at a website run by the U.S. Department of Defence. The site lets people download documents, and the researcher found that the download link did not check who was asking. Anyone who typed the right web address could pull down other people's files.
Think of a hotel where every room key is just the room number written on a card. If the front desk never checks your name, you can write "214" on a card and open room 214, even though you booked room 101. Here, the "room number" is a number in the web address, and the "room" is a stored document.
The vulnerable address given in the report is:
https://www.████████/Download.aspx?id=4675
Breaking it down:
https://www.████████/is the site's address, the same kind of address you type in your browser's bar.Download.aspxis the page (a small program on the server) that hands out files. The.aspxending usually indicates Microsoft's ASP.NET technology, a common way to build websites.?id=4675is the part after the question mark. It passes a value to that page: here, the number 4675. The page uses this number to decide which file to send back.
A request is simply your browser asking a server for something, and the server's answer is the response. The id value is the only thing that picks the file. There is no password, no login check, nothing that ties the number to the person asking.
The researcher's reproduction steps are short:
- Go to the URL
https://www.█████████/Download.aspx?id=4675. - Add any desired id.
- Then you will see a variety of sensitive files and contracts which contain PIIs and other classified documents.
Step 1 shows the starting point: the URL with one identifier. Step 2 is the heart of the bug. Changing the number is like trying the next room number down the corridor. If the numbers can be guessed, a person can try them one by one. Step 3 is the result: the server returns sensitive files and contracts containing PII and other classified documents.
What was in those documents, according to the report? Attachments and documents belonging to users: bank and tax records, contracts, and personal information (PII) such as full address, mobile number and email addresses. The report also says classified documents could be reached the same way. PII means personally identifiable information, any detail that can point to a specific real person.
The impact section states it plainly: an unauthenticated attacker can obtain PII of users and soldiers and can leak classified documents. "Unauthenticated" means the person never logged in at all. They did not need an account, a password or a session. They did not need to log in.
The report does not show the actual files, their names, the server's responses or a list of working numbers, so we cannot say exactly what any single download contained. The platform records the issue as high severity, with a CVSS score of 7.5 (CVSS is a standard 0 to 10 scale for rating how serious a flaw is), a bounty of 500.00 USD paid to the researcher, and public disclosure on 2024-06-27.
In general, how this kind of bug works
This is called an Insecure Direct Object Reference, or IDOR. The name describes it well: the application refers to an internal object (a file, a record, an invoice) directly, using a value the user supplies, and never checks on the server whether that user is allowed to see that particular object.
The object reference can be a number, a long random-looking string called a UUID, a file name or part of the address. Sequential numbers are the easiest to abuse because you can simply count upwards. Random strings make guessing harder, but they do not fix the flaw: if someone learns or shares one, it still opens the door for anyone holding it.
A useful distinction: this is an authorisation failure, not an authentication failure. Authentication asks "who are you?" Authorisation asks "are you allowed to do this?" Here the server never even asked the first question, and it certainly never asked the second. Even on sites that do require a login, the same bug appears when the server knows who you are but never compares you with the owner of the file you requested.
How would you test for it, in general?
- Find pages that return something by a number or name: download links, invoices, receipts, attachments, profile pages, API addresses such as
/api/users/{id}or/documents/{id}. - Create two ordinary accounts at the same level, and if possible one with different permissions. Put at least one item you own into each.
- Note the format of the identifier for your own items: a plain number, a random string, a file name, or a combination such as
idplususerId. - Swap in the other account's identifier, then try numbers that belong to nobody you know (one higher, one lower, a value seen elsewhere). Do this while logged in and also with no login at all, because missing login and missing permission are two separate problems.
- Try the same swap in other places too: form fields, parts of the address, headers and cookies. Headers are extra lines of information your browser sends with every request; cookies are small pieces of data a site stores in your browser, often to remember that you are logged in. A token is a similar short value used to prove identity or permission. Removing or replacing one can reveal whether the check depends on it.
- A positive result is a response that shows someone else's data or a file you should not see: the right content, a success status, or a download containing another person's details. A negative result is a consistent refusal (status codes 401, 403 or 404) or a redirect to a login or error page.
Watch for false positives. Some sites return a friendly error page with a success status code (200), so read the content, not just the code. Some files really are public, such as brochures. Sometimes caching or an old session makes it look like you reached another account when you did not. And some responses are empty placeholders. Prove impact by showing the content is sensitive and belongs to someone else, and stop after the first confirmed record rather than downloading more than needed.
How is it fixed? The server must check, on every single request, that the person asking is logged in and is entitled to that exact object. Better still, the server should look up documents by the logged-in user's identity instead of trusting a number from the browser. Where direct references must stay, use unguessable values, ideally signed tokens that expire and are tied to both the user and the object. Refusals should look the same whether or not the object exists, so the site does not confirm which numbers are real. Finally, logging and rate-limiting downloads makes mass guessing visible.
Where does this bug hide? Anywhere a site stores files or records per person and hands them out by key: document handlers, invoice downloads, support ticket attachments, HR and payroll portals, and mobile app interfaces that mirror the website. Warning signs include short numbers in addresses, parameters named id, file, doc, attachment or download, pages ending in .aspx that stream files, and pages that answer without any login. Comparing two accounts, and checking whether a logged-out request behaves like a logged-in one, is usually enough to find it.
To get a report accepted, show the smallest request that reproduces the problem, the response proving the data belongs to someone else, and a clear statement of who is affected. Blur sensitive content in screenshots, stop at the first confirmed record, and explain the business impact in terms the organisation cares about: exposed personal data, legal exposure, or access to internal documents. If no login is needed, say so explicitly, because that raises the severity well above a bug between two ordinary users.
Glossary
- Request: a message your browser sends to a server asking for a page, file or data.
- Response: what the server sends back, such as a web page, a file or an error.
- Endpoint: a specific address on a server that performs a particular action, such as downloading a file.
- Query string: the part of a web address after the
?, carrying values such asid=4675. - Parameter: a named value passed to a page, like
idin?id=4675. - ASP.NET / .aspx: Microsoft's technology for building websites; pages often end in
.aspx. - Authentication: proving who you are, usually by logging in.
- Authorisation: deciding whether an identified person is allowed to do or see something.
- Unauthenticated: not logged in at all.
- IDOR (Insecure Direct Object Reference): a flaw where a site lets you reach an object by supplying its identifier without checking that you are allowed to.
- Object reference: the value that names an item on the server, such as a number or file name.
- PII: personally identifiable information, any data that can identify a real person, such as an address, phone number or email.
- Session: the period during which a site remembers you are logged in, usually via a cookie.
- Cookie: a small piece of data a site stores in your browser, often to keep you logged in.
- Token: a short value used to prove identity or permission, often sent with requests.
- Header: extra information sent alongside a request or response, such as the browser type.
- UUID: a long, random-looking identifier that is hard to guess.
- Enumeration: trying identifiers one after another to discover which ones work.
- CVSS: a standard 0 to 10 scale for rating the severity of a security flaw.
- Bounty: a payment made to a researcher who reports a valid security flaw.
- Status code: a number in the response saying how it went, such as 200 for success, 401 for not logged in, 403 for forbidden, 404 for not found.
- False positive: a result that looks like a flaw but is not one.
- Rate-limiting: restricting how many requests can be made in a period of time.