A Story of an IDOR bug I found on a SaaS application
The application failed to verify that the companyId in an AddToScratchPad request belonged to the authenticated user. An attacker could swap their session token with another user's to add objects from that user's company to their own scratchpad, affecting data integrity.
Published on medium.com
IDORs. If you’re reading this, it’s probably too late!
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could add objects from another user's company to their own scratchpad, affecting data integrity; the report notes this is usually less impactful than reading another user's data.
What the attacker needed
Two accounts on the SaaS application; ability to intercept and modify requests; knowledge of another user's companyId
How it was found
- Set up a second account in a different browser and sign in to obtain its session cookie.
- In the main account, go to the workspace and company, then create a report.
- Configure a proxy (e.g., Burp) to intercept requests.
- Select an object to add to the scratchpad and initiate the request.
- In the proxy, replace the session token with the dummy account's token and forward the request.
- Confirm the object was still added to the main account's scratchpad.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
An IDOR (Insecure Direct Object Reference) happens when a website lets you access or change something just by knowing its identifier, without checking if you are allowed to. Here, the app accepted a company identifier from another user's account when adding an object to a scratchpad, so the attacker could act as that other user. This is like using someone else's library card number to borrow books on their account.
What is IDOR?
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.