Skip to content
IDOR Write-up Intermediate

From Org Takeover to Pre-Auth Org Takeover: The Bypass

After a previous IDOR fix, the login 'pick' endpoint still let an attacker take over any user's organisation without the victim's session. The new cookie and XSRF checks only validated the length of the values, so any same-length value could be substituted to bypass the fix.

xploiterr Follow

Published on medium.com

After my previous IDOR report team pushed the fix and closed report as resolved. Always after the fix is pushed for my reported issues, I always wanted to see if there is any bypass or at least understand how the fix has been implemented by the team.

xploiterr, 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.

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

Root cause

Likely the fix validated only the length of the cookie and nonce parameters rather than their actual values or binding them to the session.

Impact

An attacker could take over the organisation of any user on the platform without needing the victim's session.

What the attacker needed

Knowledge of target organisation ID; ability to send crafted requests

The fix

The program fixed this and paid a bounty.

How it was found

  1. Send a request to the internal login pick endpoint with the organisation pick cookie, nonce cookies and XSRF token.
  2. Replace the cookie values with arbitrary values of the same length.
  3. Observe that the server accepts the request and returns a session for the target organisation.

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.

When you log in, the server uses a cookie to remember which organisation you picked. The developers tried to secure this by checking that the cookie values have the right length, but they never checked what the values actually were. So an attacker could put in any value of the same length and the server would accept it, letting them take over someone else's organisation.

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.

More by xploiterr

View all

19 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.