Skip to content
IDOR Write-up Beginner

IDOR leads to getting Access tokens of users linked to Google Drive on Edmodo

An API endpoint that checked whether a user had linked their Google Drive account accepted an arbitrary user_id, allowing enumeration of linked users. A second endpoint that issued Google Drive access tokens also failed to validate the user_id, so an attacker could obtain other users' access tokens.

Aagam shah Follow

Published on medium.com

{{media:0}}

Aagam shah, 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 API endpoints trusted the user_id parameter from the request without verifying that it belonged to the authenticated user.

Impact

An attacker could obtain Google Drive access tokens of other users, potentially allowing access to their Google Drive files for adding files.

What the attacker needed

A valid Edmodo account; victim has linked Google Drive

The fix

The issue was fixed and now returns a Forbidden message.

How it was found

  1. Map the application and find the new Google Drive file-adding feature.
  2. Capture the request to the sso_user_exists endpoint that checks Google Drive linking.
  3. Change the user_id parameter to other values to enumerate users who linked Google Drive.
  4. Capture the request to the access_token endpoint that issues Google Drive tokens.
  5. Change the user_id parameter to another user's ID to obtain their access token.

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) is when a website uses a user-supplied identifier, like a user ID, to look up data without checking that the requester is allowed to see it. Here, changing the user ID in a request let the researcher see whether other people had linked Google Drive and then get their access tokens, which are like temporary passwords for Google Drive.

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 from Edmodo

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.