Skip to content
IDOR Write-up Intermediate

How I was able to read any users confidential reports on a public level domain

The report describes how a user could clone another user's confidential report by tampering with a hidden parameter and the referrer header, and also add an external user to another user's report. An attacker could read and modify other users' confidential reports.

Tobydavenn Follow

Published on medium.com

Hello all, today’s write up is about how I chained IDOR with BAC to read any users confidential reports on a public domain (we will call it redacted).

Tobydavenn, 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

The target is a public-facing web application that lets users create and store reports. The author refers to the domain only as "redacted". Each report belongs to a user, and the application exposes several features around those reports: reading a report, cloning an existing report into a new one, adding another user to a report with edit or read-only permissions, and uploading images to a report.

The write-up describes chaining an IDOR with broken access control (BAC) to read other users' confidential reports, and then finding further issues in the same feature set.

Setup

The report does not describe the accounts, roles, tools or versions used beyond the following: the researcher used BurpSuite to intercept and modify requests, and used an external account to be added to another user's report. The report does not give the application name, the parameter names, or the exact request bodies.

Finding it

The starting point was the feature that lets a user read their own reports. It took a GET request with the report name as a parameter. When the report name on a user's profile was changed to a report belonging to someone else, the server returned a 403 response. That behaviour is itself useful: a 403 for a report that exists and a 404 not found for one that does not lets an attacker harvest valid report names.

Guessing the identifier directly was not practical. The session ID was too complex to brute force or guess, and comparing session strings showed each one was completely different.

Exploitation

Step 1: Clone another user's report

The application had a function that let a user clone an existing report into a new report. On the client side, the user was only shown reports they owned. When the request was passed from the client to the server and the hidden parameter defining which report to clone was tampered with, the server trusted the input completely. There was little server-side checking that the requesting user's ID had permission to the report. The only check was in the referrer header, which ensured the user was coming from a report ID they had actually requested. That header can be changed with BurpSuite.

By changing the parameter responsible for the original clone to a report of another account, a clone of that user's report was created directly in the attacker's profile.

Step 2: Add an external account to another user's report

A second feature let a user add another user to their report with either edit or read-only permissions. Tampering with the report ID here produced a 403 response, so the report could not be viewed directly through this path.

The workaround was to take the attacker's own report ID, pass it through, intercept the function that adds an external user, and change the report ID to the target report. The parameter identifying the report was present again, and the referrer was changed to pretend the request came from the report the attacker did not own. The external account was then added to another user's report.

Step 3: Access report images unauthenticated

The researcher was also able to directly view any user's uploaded images attached to their reports while unauthenticated. Because of the nature of the report function, those images contain PII. The same access also allowed deleting those images.

Root cause

The core mistake is that the server trusted client-supplied identifiers for the report being cloned or shared, with little server-side checking that the requesting user had permission to that report. The only access control in place was a referrer header check, which is trivially spoofed with an intercepting proxy. The 403 on the direct read path shows that some authorisation existed there, while the clone and share paths relied on a referrer header check. The image access issue is separate: images could be viewed and deleted while unauthenticated.

Impact

An attacker with a normal account could clone any other user's report into their own profile, and could add an external account to another user's report with edit or read-only permissions. The researcher reports two findings, one critical and one High. Separately, anyone unauthenticated could view and delete images uploaded to any user's reports, which contain PII; that issue was rated medium.

Fix

Based on the root cause, the server should verify on every clone, share, image read and image delete request that the authenticated user owns the report or holds the required permission, rather than relying on a referrer header or on client-supplied identifiers alone.

Variants to test

  1. Clone or duplicate endpoints: intercept the request and swap the source report ID for one belonging to another account, adjusting the referrer. A positive result is a new report in your profile containing another user's content.
  2. Share or collaborator endpoints: submit your own report ID, then change it to a target report ID in the intercepted request. A positive result is your second account appearing as a collaborator on a report you do not own.
  3. Direct object references on read paths: enumerate report names and compare 403 versus 404 responses to map valid identifiers, then look for endpoints that skip the check.
  4. Unauthenticated media access: request image URLs attached to reports without a session. A positive result is image content returned without authentication, and a delete request succeeding.
  5. Referrer-only checks: replay any state-changing request with a forged Referer header pointing at a resource you do control. A positive result is the request being accepted.

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. 12 min read.

What happened, in plain words

A security researcher found a website where people can write and store private reports. The site had a few features around those reports: you could read your own report, make a copy of a report (called cloning), invite another person to your report with either edit or read-only permission, and upload images into a report.

The researcher discovered that the site checked who you were when you tried to read someone else's report, but it did not check properly when you asked it to copy a report or to add a person to a report. By changing a number or name in the request that the browser sends to the server, the researcher could copy another person's private report into their own account, and could add a second account to a report they did not own. Separately, anyone at all, even without logging in, could view and delete images that other people had uploaded into their reports.

The researcher calls the site only "redacted", so we do not know its name. The write-up does not give the exact parameter names or the exact request bodies either. What it does give is the sequence of steps and the reasoning behind each one, which is what this article walks through.

The ideas you need first

Before the steps make sense, here are the basic building blocks. None of them require any security background.

A website is a conversation

When you use a website, your browser sends small messages to a computer somewhere else (the server) and gets messages back. Each message is called a request, and the reply is called a response. A request has a method (a verb such as GET, which means "give me this", or POST, which means "here is some data, do something with it"), a URL, and sometimes extra data called parameters.

A useful comparison is ordering at a restaurant. The menu item you point at is the URL, the waiter carrying your order to the kitchen is the request, and the plate coming back is the response. The kitchen (the server) decides what you get.

Parameters are the knobs on the request

A parameter is a named value attached to a request, for example the name of the report you want to see. Websites often put parameters in the URL (after a ?) or in the body of a POST request. The server reads them to decide what to do. If the server trusts a parameter without checking it, a user can turn that knob to a value the site never intended.

Cookies and session IDs are your wristband

When you log in, the server gives your browser a small piece of data, usually stored in a cookie, that identifies your logged-in session. Think of a festival wristband: the staff at the gate check it once, and after that the wristband is what proves you are allowed in. The value inside is often called a session ID or session token. If someone could guess another person's session ID, they could pretend to be that person. That is why sites make these values long and random.

APIs are the serving hatch

An API (application programming interface) is the set of doors a website offers for programs to talk to it. When you click a button, your browser often calls one of these doors behind the scenes. A tool like BurpSuite sits between your browser and the server, like a person standing at the serving hatch who can read and rewrite your order before it reaches the kitchen.

IDOR and broken access control

IDOR stands for Insecure Direct Object Reference. It means the site lets you refer to something (a report, a photo, an invoice) by an identifier such as a name or number, and does not check that the thing belongs to you. Imagine a cloakroom that hands out numbered tickets, and the attendant gives you any coat whose number you ask for, without checking your ticket.

Broken access control (BAC) is the broader name for this family of mistakes: the site has rules about who may do what, but the rules are missing or applied inconsistently. IDOR is one kind of broken access control.

Status codes are the server's short replies

Servers answer with a three-digit status code. Two matter here:

  • 403 means "I know what you are asking for, but you are not allowed".
  • 404 means "I cannot find that".

A 403 and a 404 look similar to a casual user but mean very different things to a tester, as you will see.

The referrer header is the "where did you come from" note

The Referer header (the spelling is a historical accident) is a note your browser attaches to a request saying which page you were on when you clicked. It is like a visitor signing a guestbook with the room they came from. Because it is just a note written by the browser, anyone using an intercepting tool can write whatever they like in it. It is not proof of anything.

BurpSuite is the middleman

BurpSuite is a tool that sits between your browser and a website. It lets you pause a request, read it, change any part of it, and then send it on. The researcher used it to tamper with requests, which is the core technique in this story.

Setting the scene

The target is a public website where users create and store reports. Each report belongs to one user. Around those reports the site offers four features:

  1. Reading a report.
  2. Cloning an existing report into a new one.
  3. Adding another user to a report, with edit or read-only permission.
  4. Uploading images into a report.

The researcher used an external account, which was added to another user's report. The write-up does not name the accounts, the roles, the software versions, or the exact request bodies.

Step 0: Reading your own report, and what the error codes revealed

The starting point was the ordinary feature for reading your own report. The site sent a GET request that included the report name as a parameter.

When the researcher changed the report name on their own profile to the name of a report belonging to someone else, the server answered with a 403. That is, the server recognised the report existed but refused access.

Why does that matter? Because the server's two possible refusals tell you different things:

  • If the report name exists but is not yours, you get 403.
  • If the report name does not exist at all, you get 404 not found.

So by trying names and watching which code comes back, you can work out which report names are real, without ever seeing their contents. The researcher describes this as harvesting valid report names. It is like testing door keys in a hotel corridor: a key that turns but is stopped by a chain tells you a room exists, even though you cannot get in.

The obvious next idea would be to guess someone's session ID and simply log in as them. That did not work. The session ID was too complex to brute force or guess, and when the researcher compared session strings, each one was completely different. Brute forcing means trying huge numbers of guesses until one works; with long random values, the number of guesses needed is far too large.

Step 1: Cloning another user's report

The site had a feature that let a user clone an existing report into a new report. Cloning means making a copy: the site reads the original and writes a new one, usually in your own account.

On the client side, the user was only shown reports they owned. The client side is everything happening in your browser: the page, the buttons, the list of your reports. The server side is the computer that actually stores the data. A golden rule of web security is that anything enforced only on the client side is a suggestion, not a rule, because the browser belongs to the user and can be bypassed.

When the request went from the client to the server, it carried a hidden parameter that said which report to clone. The researcher tampered with that parameter. The server trusted the input completely: there was little server-side checking that the ID of the requesting user had permission to that report.

The only check in place was in the referrer header. That header ensured the user was coming from a report ID they had actually requested. In other words, the site asked "did you arrive here from a page you were allowed to see?" rather than "do you own the report you are asking me to copy?". Since the referrer is just a note the browser writes, it can be changed with BurpSuite.

So the researcher changed the parameter responsible for the original clone to a report of another account, and changed the referrer with BurpSuite. The result: a clone of that user's report was created directly in the attacker's profile.

Why did this work? Because the server was trusting two things it should never trust on their own: an identifier supplied by the client, and a header supplied by the client. Neither proves who owns what. The server should have looked up the logged-in user and checked that this user owns the report being cloned.

Step 2: Adding an external account to another user's report

A second feature let a user add another user to their report, with either edit or read-only permissions. This is the sharing feature: you invite a colleague so they can work on the report, or just read it.

Tampering with the report ID here produced a 403 response, so the report could not be viewed directly through this path. The site was checking something on this route.

The workaround was to take the attacker's own report ID, pass it through, intercept the function that adds an external user, and change the report ID to the target report. The parameter identifying the report was present again, and the referrer was changed to pretend the request came from the report the attacker did not own. The external account was then added to another user's report.

The researcher took their own report ID, passed it through, then changed the report ID in the intercepted request. This is a common pattern: find the moment where the check happens, then change the value after that moment.

Step 3: Viewing and deleting report images without logging in

The researcher was also able to directly view any user's uploaded images attached to their reports while unauthenticated. Unauthenticated means without logging in at all: no account, no session, no wristband. Because of the nature of the report function, those images contain PII, personally identifiable information: data that can identify a real person, such as a name, a face, or contact details.

The same access also allowed deleting those images. So the image paths had no authorisation check at all, neither for reading nor for deleting.

Why it happened

The core mistake is that the server trusted client-supplied identifiers for the report being cloned or shared, with little server-side checking that the requesting user had permission to that report. The only access control in place was a referrer header check, which is trivially spoofed with an intercepting proxy.

The 403 on the direct read path shows that some authorisation existed there, while the clone and share paths relied on a referrer header check. The image access issue is separate: images could be viewed and deleted while unauthenticated.

A useful comparison: a building where the front door has a guard, but the side door and the loading bay are wide open. The guard at the front proves the building knows about security; it does not prove the building is secure.

What it was worth

The researcher reports two findings from the clone and share work, one critical and one High. The image issue, where anyone unauthenticated could view and delete images containing PII, was rated medium.

How to fix it

Based on the root cause, the server should verify on every clone, share, image read and image delete request that the logged-in user owns the report or holds the required permission, rather than relying on a referrer header or on client-supplied identifiers alone.

In plain terms: every time the server is about to do something with a report, it should ask "who is logged in, and does this report belong to them or has it been shared with them?" and answer that question from its own records, not from anything the browser sent.

Things to try yourself

If you want to practise this pattern on a site you are allowed to test, here are the same ideas written as checks:

  1. Clone or duplicate endpoints: intercept the request and swap the source report ID for one belonging to another account, adjusting the referrer. A positive result is a new report in your profile containing another user's content.
  2. Share or collaborator endpoints: submit your own report ID, then change it to a target report ID in the intercepted request. A positive result is your second account appearing as a collaborator on a report you do not own.
  3. Direct object references on read paths: enumerate report names and compare 403 versus 404 responses to map valid identifiers, then look for endpoints that skip the check.
  4. Unauthenticated media access: request image URLs attached to reports without a session. A positive result is image content returned without authentication, and a delete request succeeding.
  5. Referrer-only checks: replay any state-changing request with a forged Referer header pointing at a resource you do control. A positive result is the request being accepted.

Glossary

  • API: the set of doors a website offers so that programs (including your browser) can talk to it.
  • Authorisation: the rules about what a logged-in user is allowed to do.
  • Broken access control (BAC): a class of bug where the site has rules about who may do what, but they are missing or applied inconsistently.
  • Brute force: trying huge numbers of guesses until one works.
  • BurpSuite: a tool that sits between your browser and a website so you can read and change requests before they are sent.
  • Client side: everything happening in your browser, such as the page and the buttons.
  • Clone: to make a copy of an existing item, here a report.
  • Cookie: a small piece of data a website stores in your browser, often used to remember that you are logged in.
  • GET: a request method meaning "give me this".
  • Header: an extra labelled line attached to a request or response, carrying information such as where you came from.
  • IDOR (Insecure Direct Object Reference): a bug where the site lets you name an object by an identifier and does not check that it belongs to you.
  • Parameter: a named value attached to a request that the server reads to decide what to do.
  • PII (personally identifiable information): data that can identify a real person, such as a name, face or contact detail.
  • POST: a request method meaning "here is some data, do something with it".
  • Referer header: a note the browser attaches saying which page you came from; it can be freely changed by an intercepting tool.
  • Request: a message your browser sends to a server.
  • Response: the server's reply to a request.
  • Server side: the computer that stores the data and enforces the rules.
  • Session ID / session token: the value that proves you are logged in, like a festival wristband.
  • Status code: a three-digit number in a response; 403 means "not allowed", 404 means "not found".
  • Tamper: to change a request before it reaches the server.
  • Unauthenticated: without being logged in at all.

More by Tobydavenn

View all

11 more disclosed reports, best first.

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.